mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 18:38:11 +08:00
Adds timeout and reincarnation test
Also found a bug because of this.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
# simple countdown, returns nothing
|
||||
from time import sleep
|
||||
|
||||
|
||||
def countdown(n):
|
||||
while n > 0:
|
||||
n -= 1
|
||||
@@ -23,6 +26,11 @@ def word_multiply(x, word=''):
|
||||
return len(word) * x
|
||||
|
||||
|
||||
def count_forever():
|
||||
while True:
|
||||
sleep(0.5)
|
||||
|
||||
|
||||
def get_task_name(task):
|
||||
return task.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user