mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-08 04:08:11 +08:00
Adds a 'minutes' option to the scheduler
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user