mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
SERVER_NAME needs the env
This commit is contained in:
parent
f17d12a10c
commit
27d5803ca9
1 changed files with 5 additions and 5 deletions
|
@ -450,11 +450,6 @@ CELERY_IMPORTS = ("apps.rss_feeds.tasks",
|
|||
"apps.feed_import.tasks",
|
||||
"apps.search.tasks",
|
||||
"apps.statistics.tasks",)
|
||||
if "task-work" in SERVER_NAME:
|
||||
CELERY_WORKER_CONCURRENCY = 4
|
||||
else:
|
||||
CELERY_WORKER_CONCURRENCY = 16
|
||||
|
||||
CELERY_TASK_IGNORE_RESULT = True
|
||||
CELERY_TASK_ACKS_LATE = True # Retry if task fails
|
||||
CELERY_WORKER_MAX_TASKS_PER_CHILD = 10
|
||||
|
@ -623,6 +618,11 @@ except ModuleNotFoundError:
|
|||
if not started_task_or_app:
|
||||
print(" ---> Starting NewsBlur development server...")
|
||||
|
||||
if "task-work" in SERVER_NAME:
|
||||
CELERY_WORKER_CONCURRENCY = 4
|
||||
else:
|
||||
CELERY_WORKER_CONCURRENCY = 16
|
||||
|
||||
if not DEBUG:
|
||||
INSTALLED_APPS += (
|
||||
'django_ses',
|
||||
|
|
Loading…
Add table
Reference in a new issue