Created
October 28, 2012 15:35
-
-
Save alexanderjulo/3968928 to your computer and use it in GitHub Desktop.
Revisions
-
Alexander Jung-Loddenkemper revised this gist
Oct 28, 2012 . 3 changed files with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ @celery.task(name='questionnaire.suitability') @with_request_context def questionnaire_suitability(uid, suitable, treatment, explanation): This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ [2012-10-28 16:30:35,139: ERROR/MainProcess] Task questionnaire.suitability[d360d01a-5c77-4e63-8a2d-4c54b25f8418] raised exception: TypeError('questionnaire_suitability() takes exactly 2 arguments (4 given)',) Traceback (most recent call last): File "/var/www/virtual/venv/lib/python2.7/site-packages/celery/task/trace.py", line 212, in trace_task R = retval = fun(*args, **kwargs) File "/var/www/virtual/source/tools/celery.py", line 33, in __call__ TypeError: questionnaire_suitability() takes exactly 2 arguments (4 given) File renamed without changes. -
Alexander Jung-Loddenkemper created this gist
Oct 28, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ def with_request_context(f): @wraps(f) def wrapper(*args, **kwargs): with www.test_request_context('/'): return f(*args, **kwargs) return wrapper