python - How can I write tests to make sure celery tasks go into the right queue -


due complicated callback/chaining setup tasks in our infrastructure seem going queues not assigned to. want write automated tests make sure celery task sent queue specified handled by.

setup example:

from celery import celery  celery = celery()  @celery.task(base=mytask, queue='mytasks.add') def add(x, y):     = x + y     return  @celery.task(base=mytask, queue='mytasks.dadd') def double_add(a, y):     b = + y  def caller(x, y):     add.apply_async(args=(2, 1), kwargs={''callback': double_add.subtask(args=(3)) }) 

so here "add" should handled queue='mytasks.add', , "double_add" should handled queue='mytasks.dadd'

i understand basic result based testing celery such shown here: how unit test celery task?

but appreciate insight testing process above scenario.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -