|
|
@ -29,7 +29,8 @@ especially when some kind of error happens on the server.
|
|
|
|
|
|
|
|
|
|
|
|
The `worker_registry` class is used to store information about workers, their
|
|
|
|
The `worker_registry` class is used to store information about workers, their
|
|
|
|
status and the jobs in their queue. It can look up a worker using the headers
|
|
|
|
status and the jobs in their queue. It can look up a worker using the headers
|
|
|
|
received with a request. It also uses a basic load balancing algorithm -- the
|
|
|
|
received with a request (a worker is considered suitable if and only if it
|
|
|
|
|
|
|
|
satisfies all the headers). It also uses a basic load balancing algorithm -- the
|
|
|
|
workers are contained in a queue and whenever one of them receives a job, it is
|
|
|
|
workers are contained in a queue and whenever one of them receives a job, it is
|
|
|
|
moved to the back, which makes it less likely to receive another job soon.
|
|
|
|
moved to the back, which makes it less likely to receive another job soon.
|
|
|
|
|
|
|
|
|
|
|
|