summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2012-11-16 11:47:37 +0200
committerYuval Adam <yuv.adm@gmail.com>2012-11-16 11:47:37 +0200
commit67baad6f7d987883b7b5ba6223d7826bde440905 (patch)
tree3549dd6d3968169d62663ae98636aa3b9fd67186
parent13c4ebbc15e04f3a11d82d460f2e95f1852f97c6 (diff)
Use timedelta instead of crontab for scheduling
-rw-r--r--tasks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index e65a256..5ece5fc 100644
--- a/tasks.py
+++ b/tasks.py
@@ -1,14 +1,14 @@
import logging
from celery import Celery
-from celery.schedules import crontab
+from datetime import timedelta
celery = Celery('tasks', broker='redis://localhost')
CELERYBEAT_SCHEDULE = {
'every-ten-secs': {
'task': 'tasks.print_fib',
- 'schedule': crontab(minute='*/1'),
+ 'schedule': timedelta(seconds=10),
'args': (30),
},
}