Skip to content

Commit

Permalink
modified: docker-compose.yml
Browse files Browse the repository at this point in the history
	modified:   whatisit/apps/wordfish/views.py
	modified:   whatisit/settings.py
  • Loading branch information
vsoch committed Dec 24, 2016
1 parent 69a4d0a commit cd7c509
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ redis:

worker:
image: vanessa/whatisit
command: celery worker -A whatisit.celery -Q default -n default@%h
command: celery worker -A whatisit.celery -Q default -l debug -n default@%h
volumes:
- .:/code
volumes_from:
Expand Down
9 changes: 4 additions & 5 deletions whatisit/apps/wordfish/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,9 @@ def bulk_annotate(request,cid,sid=None):
seen_annotations = []
for selection_key in selection_keys:
name = selection_key.replace("whatisit||","")
label = request.POST.get(selection_key,"")[0]
label = request.POST.get(selection_key,"")
if label != "":

allowed_annotation = AllowedAnnotation.objects.get(name=name,
label=label)

Expand All @@ -879,17 +880,15 @@ def bulk_annotate(request,cid,sid=None):

for report in reports:
# Update user annotation sent to celery to run async
update_user_annotation.apply_async(kwargs={'user':user.id,
update_user_annotation.apply_async(kwargs={'user':request.user.id,
'allowed_annotation':allowed_annotation.id,
'report':report.id})
#result = update_user_annotation.apply_async([user.id,
# allowed_annotation.id,
# report.id])

messages.info(request,"Annotation %s:%s task running for %s reports" %(name,label,reports.count()))
else:
messages.error(request,"Could not bulk annotate %s." %(name))


return view_report_collection(request,cid)

# Otherwise just render the form
Expand Down
1 change: 1 addition & 0 deletions whatisit/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

from kombu import Exchange, Queue
import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
Expand Down

0 comments on commit cd7c509

Please sign in to comment.