Files
fm-orchestrator/tests
Qixiang Wan ab0b513562 Add celery task router
Add route_task function to route celery tasks to different queues.
If we can figure out what the module build is a task ran for by
checking the task arguments, then we route this task to a queue
named:

    "mbs-{}".format(module_build_id % num_workers)

"num_workers" has default value of 1, and can be changed in
backend_config.py. If module build id can't be figured out, task will
be routed to the default queue which is named "mbs-default".

While setting up the workers, the number of workers should match with
"num_workers" in config, and each worker will listen on two queues:

    1. mbs-default
    2. mbs-{number} # for example, the first worker listens on "mbs-0"

By this design, all tasks for a particular module build will be routed
to the same queue and run on the same worker serially.
2020-03-03 14:48:47 -05:00
..
2019-10-03 16:20:04 +02:00
2019-11-07 11:06:40 +08:00
2019-11-07 11:06:40 +08:00
2019-11-07 11:06:40 +08:00
2020-03-03 14:48:47 -05:00