-
Notifications
You must be signed in to change notification settings - Fork 96
Description
This forum post highlighted a feature of xtrigger housekeeping that could be improved (and maybe it is a bug, on rethink).
We claim, all tasks that depend on the same xtrigger will be satisfied by a single successful call.
But that's not quite true: we housekeep (forget) xtrigger results if there are no active tasks that depend on them.
If another dependent task comes along after that, the scheduler will call the same xtrigger again.
If an xtrigger function can be expected to stay satisfied if called again, the only consequences of this are:
- a small inefficiency (technically re-calling the function should not be necessary)
an unnecessary delay (of the xtrigger call interval) for the later task[only because my test case wasxrandomand so didn't "stay satisfied"]
But this could stall the workflow if the xtrigger does not stay satisfied. E.g. consider an xtrigger that checks for presence of a file and moves it somewhere else if found - that doesn't sound unreasonable 🤔
To change this, I think we'd have to go the DB every time an unsatisfied xtrigger shows up in the pool, to see if it had been satisfied in the past.