Private
Public Access
1
0

improved standalone tasks

This commit is contained in:
Sander Roosendaal
2017-05-10 16:57:12 +02:00
parent e40db4c55c
commit ac2bdbce3d
3 changed files with 5 additions and 17 deletions

View File

@@ -49,17 +49,6 @@ from django_rq import job
import time
from async_messages import message_user,messages
@app.task
@job
def addcomment(userid,id):
time.sleep(5)
w = Workout.objects.get(id=id)
w.notes += '\n the task has run'
w.save()
u = User.objects.get(id=userid)
messages.info(u,' The task has run')
return 1
# Custom error class - to raise a NoTokenError