Refactor module structure

Move pgsqltasks to top level to keep the task names when using Python 3
This commit is contained in:
Jan Dittberner 2020-03-04 18:14:08 +01:00
parent acf2b171a9
commit 68f0834954
12 changed files with 67 additions and 84 deletions

View file

@ -1,3 +0,0 @@
.*.swp
*.pyc
.ropeproject/

View file

@ -3,13 +3,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']:
for route in ["ldap", "file", "mysql", "pgsql"]:
if route in task:
return {
'exchange': route,
'exchange_type': 'direct',
'queue': route,
}
return {"exchange": route, "exchange_type": "direct", "queue": route}
return None