Merge branch 'release/0.1.0' into production
* release/0.1.0: define version number, document changes allow pickle content define celery routing define CELERY_TASK_SERIALIZER change default serializer to json
This commit is contained in:
commit
77ebb25b62
4 changed files with 32 additions and 4 deletions
|
@ -1,6 +1,9 @@
|
||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
* :release:`0.1.0 <2014-12-26>`
|
||||||
|
* :support:`-` configure celery task serialization, add routing for ldap tasks
|
||||||
|
|
||||||
* :release:`0.0.2 <2014-12-26>`
|
* :release:`0.0.2 <2014-12-26>`
|
||||||
* :feature:`-` implement tasks for creating and deleting SFTP and mail base directories
|
* :feature:`-` implement tasks for creating and deleting SFTP and mail base directories
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,9 @@ copyright = u'2014, Jan Dittberner'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.0.2'
|
version = '0.1.0'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.0.2'
|
release = '0.1.0'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
@ -282,6 +282,11 @@ BROKER_URL = get_env_setting('GVAFILE_BROKER_URL')
|
||||||
CELERY_RESULT_BACKEND = 'amqp'
|
CELERY_RESULT_BACKEND = 'amqp'
|
||||||
CELERY_RESULT_PERSISTENT = True
|
CELERY_RESULT_PERSISTENT = True
|
||||||
CELERY_TASK_RESULT_EXPIRES = None
|
CELERY_TASK_RESULT_EXPIRES = None
|
||||||
CELERY_ACCEPT_CONTENT = ['yaml']
|
CELERY_ROUTES = (
|
||||||
CELERY_RESULT_SERIALIZER = 'yaml'
|
'osusers.tasks.LdapRouter',
|
||||||
|
'osusers.tasks.FileRouter',
|
||||||
|
)
|
||||||
|
CELERY_ACCEPT_CONTENT = ['pickle', 'yaml', 'json']
|
||||||
|
CELERY_TASK_SERIALIZER = 'json'
|
||||||
|
CELERY_RESULT_SERIALIZER = 'json'
|
||||||
########## END CELERY CONFIGURATION
|
########## END CELERY CONFIGURATION
|
||||||
|
|
|
@ -25,6 +25,26 @@ SETFACL_CMD = '/usr/bin/setfacl'
|
||||||
RM_CMD = '/bin/rm'
|
RM_CMD = '/bin/rm'
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
def _build_sftp_directory_name(username):
|
def _build_sftp_directory_name(username):
|
||||||
"""
|
"""
|
||||||
Constructs the SFTP directory name for a given username.
|
Constructs the SFTP directory name for a given username.
|
||||||
|
|
Loading…
Reference in a new issue