asynchronous refactoring

- don't execute celery tasks directly
- introduce optional parameters to fileserver tasks to allow chaining
- handle user/group/key create and delete tasks in new osusers.signals
  class
- adapt unit tests
- change TaskResults model to store the task signatures
- generalize the local settings' logging configuration
This commit is contained in:
Jan Dittberner 2015-10-12 00:23:31 +02:00
parent bcfea10e6f
commit d5bba7a22d
12 changed files with 290 additions and 170 deletions

View file

@ -9,7 +9,7 @@ from celery import shared_task
@shared_task
def setup_file_sftp_userdir(username):
def setup_file_sftp_userdir(username, *args, **kwargs):
"""
This task creates the home directory for an SFTP user if it does not exist
yet.
@ -23,7 +23,7 @@ def setup_file_sftp_userdir(username):
@shared_task
def delete_file_sftp_userdir(username):
def delete_file_sftp_userdir(username, *args, **kwargs):
"""
This task recursively deletes the home directory of an SFTP user if it
does not exist yet.
@ -37,7 +37,7 @@ def delete_file_sftp_userdir(username):
@shared_task
def setup_file_mail_userdir(username):
def setup_file_mail_userdir(username, *args, **kwargs):
"""
This task creates the mail base directory for a user if it does not exist
yet.
@ -52,7 +52,7 @@ def setup_file_mail_userdir(username):
@shared_task
def delete_file_mail_userdir(username):
def delete_file_mail_userdir(username, *args, **kwargs):
"""
This task recursively deletes the mail base directory for a user if it
does not exist yet.