maded2 / plotng

PlotNG - plotting utility for Chia.Net
Apache License 2.0
128 stars 24 forks source link

Graceful Exit #75

Open clmarshall opened 3 years ago

clmarshall commented 3 years ago

Just a suggestion, feel free to delete if this isn't inline with your thinking.

Premise:

Suggestion: A command line option to stop creating new plots at a designated time.

MVP 1 would be just that. A command to prevent new plots from being created while letting in-progess plots continue. When sent it will stop new plots from being created. User waits until all plots are complete, can shutdown safely and resume after maintenance.

MVP 2 could take it a step further and allow scheduling for 1 time, daily, weekly (ex. chron scheme).

To hit a particular point in time it could use avg. plot time + margin of error.

EX: If avg. plot time is 5 hours and scheduled maintenance is 6pm then stop new plotting at 12:30pm for an (arbitrary) 10% margin of error. Ideally the percentage would be just enough to ensure the last plot can complete prior to scheduled time, but 99% of us would probably be happy enough just to be assured all our plots are done prior to maintenance and not worry as much about the 20-30 minutes lost.

maded2 commented 3 years ago

So why not just set the NumberOfParallelPlots to zero and let it just cleanly stop.

clmarshall commented 3 years ago

That's an excellent point. My head was more focused on the scheduling aspect of it, but I could do that now with just a chron to swap out the config file.

maded2 commented 3 years ago

can we close this issue?