Ejemplo n.º 1
0
 def query_router(self, router, task, args, kwargs, options, task_type):
     router = maybe_evaluate(router)
     if hasattr(router, 'route_for_task'):
         # pre 4.0 router class
         return router.route_for_task(task, args, kwargs)
     return router(task, args, kwargs, options, task=task_type)
Ejemplo n.º 2
0
 def query_router(self, router, task, args, kwargs, options, task_type):
     router = maybe_evaluate(router)
     if hasattr(router, 'route_for_task'):
         # pre 4.0 router class
         return router.route_for_task(task, args, kwargs)
     return router(task, args, kwargs, options, task=task_type)