Initial tests

This commit is contained in:
Ilan Steemers
2015-06-24 15:29:16 +02:00
parent 9d84e8cf49
commit 67180c1984
3 changed files with 83 additions and 43 deletions
+21 -2
View File
@@ -1,7 +1,26 @@
from django_q.models import Task
from django_q.core import async, Cluster
from django_q.core import async
default_app_config = 'django_q.apps.DjangoQConfig'
def result(name):
return Task.get_result(name)
"""
Returns the result of the named task
:type name: str or unicode
:param name: the task name
:return: the result object of this task
:rtype: object or str
"""
return Task.get_result(name)
def get_task(name):
"""
Returns the processed task
:param name: the task name
:type name: str or unicode
:return: the full task object
:rtype: Task
"""
return Task.objects.get(name=name)