Quantum predicate before running job

We use Quantum to schedule a number of jobs in our system. On the testing environment users can request a database reset that puts the database in a certain state. During the time of resetting which takes around 45 seconds, it sometimes happens that a job runs.

Then most of the time it will fail, because some database table is not ready yet. We are thinking about having some flag or state about the system being in a reset somewhere (a GenServer of Agent, doesn’t matter).

My question is now: can we configure Quantum to have a central place to check whether jobs can run or not based on some value? If not, we would have to check every job method itself, which would be a bit cumbersome.

Thanks for any input!

1 Like

We found a workaround to achieve the same. We just change the state of all jobs at runtime from active to inactive and vice versa.

1 Like