Tweak Celery Task
- Make sure Exceptions are pickleable (not sure if this was not the case but this is the pattern as documented in the celery docs. - Don't create a task_id in the GMG code, but save the one implicitely created by celery. - Don't create a task-id directory per upload. Just store queued uploads in a single directory (this is the most controversial change and might need discussion!!!) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
committed by
Rodney Ewing
parent
bd0b5daa44
commit
bf2dafd1a0
@@ -89,7 +89,7 @@ def submit_start(request):
|
||||
# Save now so we have this data before kicking off processing
|
||||
entry.save()
|
||||
|
||||
# Pass off to processing
|
||||
# Pass off to async processing
|
||||
#
|
||||
# (... don't change entry after this point to avoid race
|
||||
# conditions with changes to the document via processing code)
|
||||
@@ -97,6 +97,7 @@ def submit_start(request):
|
||||
'mediagoblin.user_pages.atom_feed',
|
||||
qualified=True, user=request.user.username)
|
||||
run_process_media(entry, feed_url)
|
||||
|
||||
add_message(request, SUCCESS, _('Woohoo! Submitted!'))
|
||||
|
||||
add_comment_subscription(request.user, entry)
|
||||
|
||||
Reference in New Issue
Block a user