Open Miksus opened 2 years ago
Hello, I would like to help with this task!
Ye, help is very much needed! I'm thinking the condition mechanism might need some touches beforehand though. The conditions could have better parametrization. I'm not currently happy how the tasks are injected to the conditions and thinking if those should be changed to be less stateful: https://github.com/Miksus/red-engine/blob/master/redengine/core/task.py#L306
Maybe use a method like "check" with the task as a parameter when checking the condition instead of relying overriding __bool__
.
Is your feature request related to a problem? Please describe. If a task was missed (due to system failure, performance reasons or missing conditions), in some cases it is desired to run the missed task(s).
Describe the solution you'd like Run stacks or a condition that allows running tasks that were missed.
Maybe something like this:
If this was missed (did not run yesterday), the
missed
should return True and the task should run again.The solution needs to check the last time the task ran and compare whether that was inside the previous timespan of the condition.
Describe alternatives you've considered A metatask or a custom condition with a stack.