Merge branch 'yandex_rebiling' into 'dev'

finance logging

See merge request !386
remotes/origin/revert-6d879fe8
Andrey 8 years ago
commit 4406bc91f7
  1. 9
      lms/celery.py
  2. 10
      lms/settings.py

@ -3,7 +3,6 @@ import os
from celery import Celery from celery import Celery
from raven import Client from raven import Client
from raven.contrib.celery import register_signal, register_logger_signal 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. # set the default Django settings module for the 'celery' program.
@ -23,11 +22,3 @@ register_signal(client)
@app.task(bind=True) @app.task(bind=True)
def debug_task(self): def debug_task(self):
print('Request: {0!r}'.format(self.request)) print('Request: {0!r}'.format(self.request))
CELERY_BEAT_SCHEDULE = {
'periodic_billing': {
'task': 'finance.tasks.periodic_billing',
'schedule': crontab(minute='0',hour='*/3',),
},
}

@ -4,6 +4,8 @@ import os
import raven import raven
import environ import environ
import socket import socket
from celery.schedules import crontab
root = environ.Path(__file__) - 2 root = environ.Path(__file__) - 2
env = environ.Env() env = environ.Env()
@ -31,6 +33,14 @@ CELERY_EMAIL_TASK_CONFIG = {
'ignore_result': False, 'ignore_result': False,
} }
CELERY_BEAT_SCHEDULE = {
'periodic_billing': {
'task': 'finance.tasks.periodic_billing',
'schedule': crontab(minute='0',hour='*/3',),
},
}
CELERYD_TASK_TIME_LIMIT = 300 CELERYD_TASK_TIME_LIMIT = 300
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Loading…
Cancel
Save