mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-02 13:48:12 +08:00
Replaces async occurrences with alternatives
* async is now a reserved word in python3.7 * Rename async function to enqueue * Rename all async_ functions to enqueue_ * Rename Async class to AsyncTask * Updates the docs.
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@
|
||||
from django.contrib import admin
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from django_q.tasks import async
|
||||
from django_q.tasks import enqueue
|
||||
from django_q.models import Success, Failure, Schedule, OrmQ
|
||||
from django_q.conf import Conf
|
||||
|
||||
@@ -41,7 +41,7 @@ class TaskAdmin(admin.ModelAdmin):
|
||||
def retry_failed(FailAdmin, request, queryset):
|
||||
"""Submit selected tasks back to the queue."""
|
||||
for task in queryset:
|
||||
async(task.func, *task.args or (), hook=task.hook, **task.kwargs or {})
|
||||
enqueue(task.func, *task.args or (), hook=task.hook, **task.kwargs or {})
|
||||
task.delete()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user