Show More
@@ -28,6 +28,7 b' Celery loader, run with::' | |||
|
28 | 28 | """ |
|
29 | 29 | import os |
|
30 | 30 | import logging |
|
31 | import importlib | |
|
31 | 32 | |
|
32 | 33 | from celery import Celery |
|
33 | 34 | from celery import signals |
@@ -77,11 +78,21 b' def get_logger(obj):' | |||
|
77 | 78 | return custom_log |
|
78 | 79 | |
|
79 | 80 | |
|
81 | imports = ['rhodecode.lib.celerylib.tasks'] | |
|
82 | ||
|
83 | try: | |
|
84 | # try if we have EE tasks available | |
|
85 | importlib.import_module('rc_ee') | |
|
86 | imports.append('rc_ee.lib.celerylib.tasks') | |
|
87 | except ImportError: | |
|
88 | pass | |
|
89 | ||
|
90 | ||
|
80 | 91 | base_celery_config = { |
|
81 | 92 | 'result_backend': 'rpc://', |
|
82 | 93 | 'result_expires': 60 * 60 * 24, |
|
83 | 94 | 'result_persistent': True, |
|
84 |
'imports': |
|
|
95 | 'imports': imports, | |
|
85 | 96 | 'worker_max_tasks_per_child': 100, |
|
86 | 97 | 'accept_content': ['json_ext'], |
|
87 | 98 | 'task_serializer': 'json_ext', |
General Comments 0
You need to be logged in to leave comments.
Login now