aboutsummaryrefslogtreecommitdiff
path: root/app/tasks/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/tasks/__init__.py')
-rw-r--r--app/tasks/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/tasks/__init__.py b/app/tasks/__init__.py
index 05da6e2..8fa75aa 100644
--- a/app/tasks/__init__.py
+++ b/app/tasks/__init__.py
@@ -18,6 +18,7 @@
import flask
from flask.ext.sqlalchemy import SQLAlchemy
from celery import Celery
+from celery.schedules import crontab
from app import app
from app.models import *
@@ -64,4 +65,12 @@ def make_celery(app):
celery = make_celery(app)
+CELERYBEAT_SCHEDULE = {
+ 'topic_list_import': {
+ 'task': 'app.tasks.forumtasks.importTopicList',
+ 'schedule': crontab(minute=1, hour=1),
+ }
+}
+celery.conf.beat_schedule = CELERYBEAT_SCHEDULE
+
from . import importtasks, forumtasks, emails