Miksus / rocketry

Modern scheduling library for Python
https://rocketry.readthedocs.io
MIT License
3.26k stars 105 forks source link

ENH: Auto reload #11

Closed Miksus closed 2 years ago

Miksus commented 2 years ago

Is your feature request related to a problem? Please describe. Update automatically the scheduler according to file changes.

Describe the solution you'd like At least the tasks should be auto reloaded: changes in the tasks should be reflected automatically and removed tasks should be automatically removed in run time.

Possibly solved by good and more structured support for tasks read from YAML files. Could work like this:

  1. User specifies YAML files that contain the tasks
  2. User creates Python scripts where the task code lies
  3. User uses TaskLoader to load the YAML files
    • If a YAML file is missing or (some of) the tasks are missing, delete those tasks from the session
    • Only process execution is allowed so that the task functions never get loaded to memory

Also, this is possibly supported but requires documentation and possibly more testing.

Describe alternatives you've considered Alternatively a robust restart mechanism so the scheduler is easy to restart when needed. This is probably already supported.

Or the user can make a Reload task that reloads all the relevant Python modules and deletes tasks that are no longer specified in these.