app.routes

Task Routing.

Contains utilities for working with task routers, (:setting:`task_routes`).

Module Contents

Classes

MapRoute(self,map) Creates a router out of a dict.
Router(self,routes=None,queues=None,create_missing=False,app=None) Route tasks based on the :setting:`task_routes` setting.

Functions

glob_to_re(glob,quote=replace)
expand_router_string(router)
prepare(routes) Expand the :setting:`task_routes` setting.
glob_to_re(glob, quote=replace)
class MapRoute(map)

Creates a router out of a dict.

__init__(map)
__call__(name, *args, **kwargs)
class Router(routes=None, queues=None, create_missing=False, app=None)

Route tasks based on the :setting:`task_routes` setting.

__init__(routes=None, queues=None, create_missing=False, app=None)
route(options, name, args=tuple, kwargs=dict, task_type=None)
expand_destination(route)
lookup_route(name, args=None, kwargs=None, options=None, task_type=None)
query_router(router, task, args, kwargs, options, task_type)
expand_router_string(router)
prepare(routes)

Expand the :setting:`task_routes` setting.