Skip to content

xtrigger housekeeping tweak? #7027

@hjoliver

Description

@hjoliver

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 was xrandom and 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug?Not sure if this is a bug or not

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions