Speaker Nancy Pelosi , D-Calif . , had to work the floor for a full hour to win the tally , which was held just after Democratic leaders forced through stopgap legislation to raise the debt limit by $ 290 billion .