rihanna v0.3.0 Rihanna.Config
Link to this section Summary
Functions
The maximum number of simultaneously executing workers for a dispatcher
How often the dispatcher should poll the database for new jobs (in milliseconds)
In Postgres, advisory locks are scoped to a classid
Link to this section Functions
The maximum number of simultaneously executing workers for a dispatcher.
50 is chosen as a sensible default. Tuning this might increase or decrease your throughput depending on a lot of factors including database churn and how many other dispatchers you are running.
How often the dispatcher should poll the database for new jobs (in milliseconds).
Default is 100.
Note that that actual poll interval in practice will be close to but not exactly this number of milliseconds for two reasons:
- A small amount of processing time for dispatching jobs is not included and will be added to the poll interval.
- A small, random amount of jitter is added to prevent multiple dispatchers started simultaneously from hitting the database at the same time.
In Postgres, advisory locks are scoped to a classid.
Here we use a random classid to prevent potential collisions with other users of the advisory locking system.
In the unimaginably unlucky scenario that this conflicts with a lock classid that is already being used, you can change it here.