commit
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
from __future__ import absolute_import
|
||||
from django.contrib.auth.models import User
|
||||
from rowers.models import Workout
|
||||
from django_rq import job
|
||||
from celery import app
|
||||
import time
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
@@ -11,21 +16,15 @@ sys.path.append(proj_path)
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rowsandall_app.settings")
|
||||
django.setup()
|
||||
|
||||
import time
|
||||
from celery import app
|
||||
from django_rq import job
|
||||
from rowers.models import Workout
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
@app.task
|
||||
def addcomment2(userid,id,debug=False):
|
||||
|
||||
def addcomment2(userid, id, debug=False):
|
||||
|
||||
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')
|
||||
messages.error(u,' Het is veel te laat')
|
||||
messages.info(u, ' The task has run')
|
||||
messages.error(u, ' Het is veel te laat')
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user