import urllib
import urllib2
-from celery import registry, task
+import celery
+from celery.registry import tasks
from mediagoblin import mg_globals as mgg
- from mediagoblin.db.models import MediaEntry
- from mediagoblin.processing import (mark_entry_failed, BaseProcessingFail,
- ProcessingState)
+ from . import mark_entry_failed, BaseProcessingFail
from mediagoblin.tools.processing import json_processing_callback
+ from mediagoblin.processing import get_entry_and_processing_manager
_log = logging.getLogger(__name__)
logging.basicConfig()
: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:
- process_media.apply_async(
+ 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"