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

Update cancel method #1038

Closed
wants to merge 4 commits into from
Closed

Update cancel method #1038

wants to merge 4 commits into from

Conversation

kt474
Copy link
Member

@kt474 kt474 commented Aug 26, 2023

Summary

related to #1019

Details and comments

Fixes #

@coveralls
Copy link

coveralls commented Aug 26, 2023

Pull Request Test Coverage Report for Build 6016014796

  • 3 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 73.974%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_ibm_runtime/runtime_job.py 3 4 75.0%
Totals Coverage Status
Change from base Build 6015555843: -0.007%
Covered Lines: 2470
Relevant Lines: 3339

💛 - Coveralls

@kt474 kt474 assigned kt474 and unassigned kt474 Aug 28, 2023
@kt474 kt474 added this to the 0.12.0 milestone Aug 28, 2023
if self._status != JobStatus.CANCELLED:
raise RuntimeInvalidStateError(
f"Failed to cancel job: {self._job_id} has status {self._status}"
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@merav-aharoni thoughts on this approach? Instead of manually setting this status to cancelled, we query the status from the server to check the actual status

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But i'm not sure if there's a better way - I don't like having to make another api call just to handle this relatively rare edge case where the job runs too quickly and cannot be cancelled.

@kt474 kt474 changed the title Update cancel method & fix integration tests Update cancel method Aug 28, 2023
@kt474 kt474 removed this from the 0.12.0 milestone Aug 29, 2023
@kt474
Copy link
Member Author

kt474 commented Sep 18, 2023

Closing for now, will reopen when this problem arrises again or we have a better solution

@kt474 kt474 closed this Sep 18, 2023
@kt474 kt474 deleted the update-options-tests branch April 29, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants