backy v0.0.14 Backy.JobConcurrencyLimiter
Summary
Functions
"run" gets called by all client processes. E.g. if you enqueue 10000 jobs, this gets called 10000 times. Each call tells the concurrency limiter about itself() and waits for it's turn to run
Functions
"run" gets called by all client processes. E.g. if you enqueue 10000 jobs, this gets called 10000 times. Each call tells the concurrency limiter about itself() and waits for it's turn to run.
The limiter keeps a count of running jobs and if there are more running jobs than the max_concurrency limit, then the jobs are stored for later.
When a job is done this function tells the limiter about it by calling "confirm_run" which updates the current state and allows another job to run.