Skip to content

Add Resume Support #171

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add Resume Support #171

wants to merge 3 commits into from

Conversation

p0rtL6
Copy link

@p0rtL6 p0rtL6 commented Apr 8, 2025

This PR adds the feature talked about in #61.

There are two new arguments

  • --taskfile writes tasks to a file as they are created and completed
  • --resumefrom takes the file made from the above and dispatches all the pending tasks left in the file. This mode resumes normal operation after dispatching tasks from the file (it also skips any tasks that have been completed already).

As far as I can tell this does not introduce noticeable overhead to the execution. Everything is written in a blocking manner meaning the task does not actually get created until it gets written to the file, this should guarantee that all tasks are saved. In addition, if you specify a task file while resuming from another, it will copy over all completed tasks from the old file into the new at the start of execution so you should be able use them even if the program is interrupted after resuming from a task file already.

Let me know if there are any problems, or if I need to make any changes.

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.

1 participant