refactor: assignment of `ticker` and `dispatcher` to steps and jobs
abelanger5 opened this issue · 0 comments
abelanger5 commented
Need a better way to manage the assignment of jobs and step runs to tickers and dispatchers, respectively.
Here's an example of how a ticker is currently assigned to a job run.
There are a few problems with this:
- The ticker is assigned in the database before the ticker has acknowledged that it's registered that job run/started a timeout process.
- The
JobsController
shouldn't need to be aware of how to assign tickers to a job or select a ticker for the job run. The jobs controller should message the task queue that a job run is available, and it should be picked up by an available ticker.
The same problems exist for scheduled workflows, crons, and step runs. In particular, the admin service shouldn't be registering/unregistering tickers for old and new workflow versions.