Refactor module structure
Move pgsqltasks to top level to keep the task names when using Python 3
This commit is contained in:
parent
acf2b171a9
commit
68f0834954
12 changed files with 67 additions and 84 deletions
3
gvapgsql/gvacommon/.gitignore
vendored
3
gvapgsql/gvacommon/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
.*.swp
|
||||
*.pyc
|
||||
.ropeproject/
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue