Jan Dittberner
17ca226dc0
git-subtree-dir: gnuviechadmin/gvacommon git-subtree-mainline:92c6b39e12
git-subtree-split:e29646a947
24 lines
586 B
Python
24 lines
586 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
class LdapRouter(object):
|
|
|
|
def route_for_task(self, task, args=None, kwargs=None):
|
|
if 'ldap' in task:
|
|
return {'exchange': 'ldap',
|
|
'exchange_type': 'direct',
|
|
'queue': 'ldap'}
|
|
return None
|
|
|
|
|
|
class FileRouter(object):
|
|
|
|
def route_for_task(self, task, args=None, kwargs=None):
|
|
if 'file' in task:
|
|
return {'exchange': 'file',
|
|
'exchange_type': 'direct',
|
|
'queue': 'file'}
|
|
return None
|
|
|
|
|