gva/gnuviechadmin/gvacommon/celeryrouters.py
Jan Dittberner 2e2d906f09 Merge commit '546441d49920caf43eb7d33976c2d71ae85f16d5'
* commit '546441d49920caf43eb7d33976c2d71ae85f16d5':
  unify routers, add support for mysql and pgsql tasks
2015-01-01 22:34:38 +01:00

15 lines
424 B
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
class GvaRouter(object):
def route_for_task(self, task, args=None, kwargs=None):
for route in ['ldap', 'file', 'mysql', 'pgsql']:
if route in task:
return {
'exchange': route,
'exchange_type': 'direct',
'queue': route,
}
return None