Skip to content

Commit

Permalink
Increase timeout in serverless tests (#2402)
Browse files Browse the repository at this point in the history
This notebook was regularly timing out in CI. This PR removes the manual
polling/timeout and just polls until the cell times out.

* In CI, it'll time out after 300s (an increase from 100s).
* In the fortnightly cron job, it'll wait until the action timesout at
6hrs.

If this is still causing problems, we can remove it from CI.
  • Loading branch information
frankharkins authored Dec 2, 2024
1 parent a2632cb commit c78c765
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions docs/guides/serverless-first-program.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -432,21 +432,17 @@
" backend=\"ibm_sherbrooke\",\n",
" optimization_level=1,\n",
")\n",
"for cycle in range(20):\n",
"while True:\n",
" sleep(5)\n",
" status = job.status()\n",
" print(f\"Cycle {cycle}: Status: {status}\")\n",
" if status not in [\"QUEUED\", \"INITIALIZING\", \"RUNNING\", \"DONE\"]:\n",
" raise Exception(\n",
" f\"Unexpected job status: '{status}'\\n\"\n",
" + \"Here are the logs:\\n\"\n",
" + job.logs()\n",
" )\n",
" if status == \"DONE\":\n",
" break\n",
"status = job.status()\n",
"if status != \"DONE\":\n",
" raise Exception(f\"Job did not complete in time (got status '{status}')\")"
" break"
]
},
{
Expand Down

0 comments on commit c78c765

Please sign in to comment.