update django/celery
This commit is contained in:
parent
d4df903f82
commit
c80f16c77a
8 changed files with 21 additions and 20 deletions
|
|
@ -8,10 +8,11 @@ from django.contrib.auth import get_user_model
|
|||
from django.conf import settings
|
||||
from django.db import models
|
||||
from django.db.models import Q
|
||||
import celery.task.control
|
||||
import kombu.five
|
||||
import ox
|
||||
|
||||
from app.celery import app
|
||||
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
def get_tasks(username):
|
||||
|
|
@ -111,7 +112,7 @@ class Task(models.Model):
|
|||
return False
|
||||
|
||||
def get_job(self):
|
||||
c = celery.task.control.inspect()
|
||||
c = app.control.inspect()
|
||||
active = c.active(safe=True)
|
||||
if active:
|
||||
for queue in active:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue