Private
Public Access
1
0

task progress monitoring celery works on client

This commit is contained in:
Sander Roosendaal
2017-11-01 00:16:05 +01:00
parent 5525dad1f6
commit fb85e5f53b
4 changed files with 100 additions and 8 deletions

View File

@@ -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',