From 30343178cc5854cd47f4ad5b8069865876476a82 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 16 Apr 2018 12:19:09 +0300 Subject: [PATCH] finance logging --- lms/celery.py | 9 --------- lms/settings.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lms/celery.py b/lms/celery.py index fb1f536..78168d7 100644 --- a/lms/celery.py +++ b/lms/celery.py @@ -3,7 +3,6 @@ import os from celery import Celery from raven import Client from raven.contrib.celery import register_signal, register_logger_signal -from celery.schedules import crontab # set the default Django settings module for the 'celery' program. @@ -23,11 +22,3 @@ register_signal(client) @app.task(bind=True) def debug_task(self): print('Request: {0!r}'.format(self.request)) - - -CELERY_BEAT_SCHEDULE = { - 'periodic_billing': { - 'task': 'finance.tasks.periodic_billing', - 'schedule': crontab(minute='0',hour='*/3',), - }, -} \ No newline at end of file diff --git a/lms/settings.py b/lms/settings.py index ce5acd6..062bffd 100644 --- a/lms/settings.py +++ b/lms/settings.py @@ -4,6 +4,8 @@ import os import raven import environ import socket +from celery.schedules import crontab + root = environ.Path(__file__) - 2 env = environ.Env() @@ -31,6 +33,14 @@ CELERY_EMAIL_TASK_CONFIG = { 'ignore_result': False, } + +CELERY_BEAT_SCHEDULE = { + 'periodic_billing': { + 'task': 'finance.tasks.periodic_billing', + 'schedule': crontab(minute='0',hour='*/3',), + }, +} + CELERYD_TASK_TIME_LIMIT = 300 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))