finance logging

remotes/origin/yandex_rebiling
Andrey 8 years ago
parent d1cbee1cae
commit 30343178cc
  1. 9
      lms/celery.py
  2. 10
      lms/settings.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',),
},
}

@ -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__)))

Loading…
Cancel
Save