mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-06 05:58:11 +08:00
Added schedule command
* improved schedule tests * updated README * bumped up to version 0.1.3
This commit is contained in:
@@ -3,22 +3,29 @@ def countdown(n):
|
||||
while n > 0:
|
||||
n -= 1
|
||||
|
||||
|
||||
def multiply(x, y):
|
||||
return x * y
|
||||
|
||||
|
||||
def count_letters(tup):
|
||||
total = 0
|
||||
for word in tup:
|
||||
total += len(word)
|
||||
return total
|
||||
|
||||
|
||||
def count_letters2(obj):
|
||||
return count_letters(obj.get_words())
|
||||
|
||||
|
||||
def word_multiply(x, word=''):
|
||||
return len(word) * x
|
||||
|
||||
|
||||
def get_task_name(task):
|
||||
return task.name
|
||||
|
||||
|
||||
def result(obj):
|
||||
print('RESULT HOOK {} : {}'.format(obj.name, obj.result))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user