-
Notifications
You must be signed in to change notification settings - Fork 25
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
Task's resume function is ignored #200
Comments
Do you need/would like to have a separate function to resume a job? |
No, this is why I suggest Option 1 and propose to remove the existing broken code that tries to do this. |
I would prefer also option 1, I used this feature once in all the years (before the bug was even introduced), and then figured out I can solve it in a different way. |
Agreed, Option 1 is the way to go here! The separation into two functions is a left over from the beginning of Sisyphus. I thought we need two function, one for a clean start and one which can resume an interrupted job. In practice I realized that the resumeable function need to handle all possible cases, including a clean start, anyway, so there is really no need to have two functions here. |
Great! Will prepare a PR. |
When defining a Task you can set a
resume
function name which is called instead of the actual Task function when a task is resumed, e.g.:For this to work, the worker need to set the resume_job flag when calling
Task.run
. But this is currently hardcoded to False:sisyphus/sisyphus/worker.py
Lines 244 to 253 in a22e923
The bug was introduced in commit c4f825b which removed the logic that detected whether a job is resumed.
To fix this I see two options:
resume: str
by aresumable: bool
(keeping and deprecatingresume
for compatibility).Any opinions? I'd vote for Option 1.
The text was updated successfully, but these errors were encountered: