2014-12-27 13:52:45 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
|
2015-01-01 22:32:37 +01:00
|
|
|
class GvaRouter(object):
|
2014-12-27 13:52:45 +01:00
|
|
|
|
|
|
|
def route_for_task(self, task, args=None, kwargs=None):
|
2015-01-26 15:43:05 +01:00
|
|
|
for route in ['ldap', 'file', 'mysql', 'pgsql', 'web']:
|
2015-01-01 22:32:37 +01:00
|
|
|
if route in task:
|
|
|
|
return {
|
|
|
|
'exchange': route,
|
2014-12-27 13:52:45 +01:00
|
|
|
'exchange_type': 'direct',
|
2015-01-01 22:32:37 +01:00
|
|
|
'queue': route,
|
|
|
|
}
|
2014-12-27 13:52:45 +01:00
|
|
|
return None
|