Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix notebook tests for "retrieve jobs" #1555

Closed
frankharkins opened this issue Jun 14, 2024 · 0 comments · Fixed by #1578
Closed

Fix notebook tests for "retrieve jobs" #1555

frankharkins opened this issue Jun 14, 2024 · 0 comments · Fixed by #1578
Assignees

Comments

@frankharkins
Copy link
Member

Noted in #1537 (comment), the retrieve jobs notebook is failing when the most recent job is cancelled. We should probably filter by job state, something like:

# Get ID of most recent successful job for demonstration.
# This will not work if you've never successfully run a job.
successful_jobs = service.jobs().filter(lambda j: j.status() == "DONE")
job_id = successful_jobs[0].job_id()
print(job_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant