From ac8741de5fd87f4ea51c00eb0264b904fccaaceb Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 29 Apr 2020 21:19:01 -0400 Subject: [PATCH] change celery log location --- frontend/tasks.py | 2 +- settings/common.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/tasks.py b/frontend/tasks.py index 1f289576..75c24cae 100644 --- a/frontend/tasks.py +++ b/frontend/tasks.py @@ -13,5 +13,5 @@ def save_info_page(): page_view = InfoPageView() page = render_to_string(page_view.template_name, context=page_view.get_context_data()) today = date.today().isoformat() - with open(join(settings.PROJECT_DIR, 'logs', 'metrics-%s.html' % today), 'w') as todays_metrics: + with open(join(settings.CELERY_LOG_DIR, 'metrics-%s.html' % today), 'w') as todays_metrics: todays_metrics.write(page) diff --git a/settings/common.py b/settings/common.py index 1345a5ab..bd96b4c2 100644 --- a/settings/common.py +++ b/settings/common.py @@ -361,6 +361,7 @@ CAMPAIGN_ARCHIVE_JS = "http://us2.campaign-archive1.com/generate-js/?u=154728787 # use redis for production queue and results BROKER_URL = "redis://127.0.0.1:6379/0" CELERY_RESULT_BACKEND = "redis://127.0.0.1:6379/1" +CELERY_LOG_DIR = "" # periodic tasks for celery from celery.schedules import crontab