question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

job.cancel() returns true but job not cancelled

See original GitHub issue

Information

  • Qiskit IBMQ Provider version:

  • API URL or version:

  • Python version:

  • Operating system:

What is the current behavior?

job.cancel() can return True even if the cancel had failed.

Steps to reproduce the problem

It cannot be reproduced at will, but show up in several Travis runs (e.g. 1425 and 1414)

What is the expected behavior?

Job is cancelled if job.cancel() returns true.

Suggested solutions

The provider currently checks for error in the response data to determine if the cancel was successful. After talking to the api team, it should also be checking for 'cancelled': True in the response data.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jyu00commented, Jan 29, 2020

API rolled out a new release that had a job cancel related fix. This should be re-tested and see if we can close.

1reaction
jyu00commented, Jan 13, 2020

In some specific window cancel() may still fail even with cancelled: True.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the difference Job.Cancel vs Scope.Cancel in ...
In your first code block, your Job does not cooperate with cancellation. It has an infinite loop and does not call any suspend...
Read more >
Cancellation and timeouts | Kotlin Documentation
The launch function returns a Job that can be used to cancel the ... and does not check for cancellation, then it cannot...
Read more >
Cancellation in Kotlin Coroutines - Kt. Academy
Once a job is cancelled, it cannot be used as a parent for any new coroutines. It is first in the "Cancelling" and...
Read more >
Job - javadoc.io
If the cause of cancellation is CancellationException, then the job is considered to be cancelled normally. This usually happens when Job.cancel is invoked ......
Read more >
Jobs, Waiting, Cancellation in Kotlin Coroutines
It can be seen that the Log Statement is not allowed to execute until that coroutine which is running finishes its work and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found