Merge branch 'master' into OPW-Moderation-Update

Conflicts:
	mediagoblin/db/migrations.py
This commit is contained in:
tilly-Q
2013-09-12 18:58:04 -04:00
131 changed files with 23317 additions and 7306 deletions

View File

@@ -76,17 +76,21 @@ def prepare_queue_task(app, entry, filename):
return queue_file
def run_process_media(entry, feed_url=None):
def run_process_media(entry, feed_url=None,
reprocess_action="initial", reprocess_info=None):
"""Process the media asynchronously
:param entry: MediaEntry() instance to be processed.
:param feed_url: A string indicating the feed_url that the PuSH servers
should be notified of. This will be sth like: `request.urlgen(
'mediagoblin.user_pages.atom_feed',qualified=True,
user=request.user.username)`"""
user=request.user.username)`
:param reprocess_action: What particular action should be run.
:param reprocess_info: A dict containing all of the necessary reprocessing
info for the given media_type"""
try:
ProcessMedia().apply_async(
[entry.id, feed_url], {},
[entry.id, feed_url, reprocess_action, reprocess_info], {},
task_id=entry.queued_task_id)
except BaseException as exc:
# The purpose of this section is because when running in "lazy"