Adds a 'minutes' option to the scheduler

This commit is contained in:
Ilan
2015-08-05 20:30:29 +02:00
parent 77395acbbb
commit de5d0f2725
6 changed files with 61 additions and 4 deletions
+7
View File
@@ -71,6 +71,13 @@ def test_scheduler(r):
hook='django_q.tests.tasks.result'
)
assert hasattr(always_schedule, 'pk') is True
# Minute schedule
minute_schedule = create_schedule('django_q.tests.tasks.word_multiply',
2,
word='django',
schedule_type=Schedule.MINUTES,
minutes=10)
assert hasattr(minute_schedule, 'pk') is True
# All other types
for t in Schedule.TYPE:
schedule = create_schedule('django_q.tests.tasks.word_multiply',