task progress monitoring celery works on client
This commit is contained in:
@@ -35,6 +35,8 @@ from django.db.utils import OperationalError
|
||||
import datautils
|
||||
import utils
|
||||
|
||||
import longtask
|
||||
|
||||
# testing task
|
||||
|
||||
|
||||
@@ -42,9 +44,14 @@ import utils
|
||||
def add(x, y):
|
||||
return x + y
|
||||
|
||||
|
||||
@app.task(bind=True)
|
||||
def long_test_task(self,aantal,debug=False,job=None):
|
||||
job = self.request
|
||||
print job.id
|
||||
return longtask.longtask(aantal,jobid=job.id,debug=debug)
|
||||
|
||||
# create workout
|
||||
|
||||
|
||||
@app.task
|
||||
def handle_new_workout_from_file(r, f2,
|
||||
workouttype='rower',
|
||||
|
||||
Reference in New Issue
Block a user