Open bbuchalter opened 10 months ago
Hey @bbuchalter, thank you for the feature suggestion. This is a much-needed feature, will implement this in the next release! :raised_hands:
This can probably be done by expanding the current Producer interface to have "serialize" and "deserialize" functions (But I think it would be better to add a 2nd trait to avoid bloating). Then catching upon ctrl_c/other signals we serialize the producer to disk. Finally just add a paremeter/separate mode to resume operations or something.
I imagine the abort logic itself can be implemented using tools from Tokio. Select! macro, signal handling, channels, a small wrapper and a CancellationToken should be enough for this. Then the issue would be to port pdfrip to be async however
@Pommaq, yes serializing the state to disk seems like the optimal approach here. Leaving some relevant links for future reference during implementation:
As a user, I'd like to be able to stop a cracking job and restart it later, So I can not lose progress.