File: urls.py

package info (click to toggle)
django-celery 3.1.17-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 916 kB
  • ctags: 1,135
  • sloc: python: 4,149; makefile: 88; sh: 64
file content (28 lines) | stat: -rw-r--r-- 627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""

URLs defined for celery.

* ``/$task_id/done/``

    URL to :func:`~celery.views.is_successful`.

* ``/$task_id/status/``

    URL  to :func:`~celery.views.task_status`.

"""
from __future__ import absolute_import, unicode_literals

from django.conf.urls import url

from . import views

task_pattern = r'(?P<task_id>[\w\d\-\.]+)'

urlpatterns = [
    url(r'^%s/done/?$' % task_pattern, views.is_task_successful,
        name='celery-is_task_successful'),
    url(r'^%s/status/?$' % task_pattern, views.task_status,
        name='celery-task_status'),
    url(r'^tasks/?$', views.registered_tasks, name='celery-tasks'),
]