On Wed, Dec 5, 2012 at 5:58 PM, Jason Judge <
jason....@gmail.com> wrote:
> That surprises me. Maybe this is an edge case, but I could imagine that some
> jobs need to be processed in order, by a single worker that handles one job
> at a time. Other jobs can be handled in parallel with a big bunch of workers
> waiting to process jobs as quickly as they arrive. This seems like two
> separate tubes to me - one with a single worker and one with a load of
> workers standing by.
Yes, that would be an example of having different types of workers
with fundamentally different capabilities.
However, I'd advise you not to rely on having a single, serial worker
process for jobs that require mutual exclusion. It's more reliable to
coordinate things like that separately, through a database or locking
service, and to express reify dependencies so they can be checked
explicitly. This also gives you the freedom to run however many
workers makes sense and possibly get more parallelism.