gvamysql/gvamysql/gvacommon/celeryrouters.py
Jan Dittberner ca0d8451d0 Refactor module structure
Move mysqltasks to top level to keep the task names when using Python3.
2020-03-04 20:08:19 +01:00

12 lines
381 B
Python

# -*- coding: utf-8 -*-
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