Simple hack to handle main workflow problem
[mediagoblin.git] / mediagoblin / submit / lib.py
index a6d564f13fce2023c256322183a02b8592a87969..b228dbd14012b5aaa67b4d409988ed48591f3b5e 100644 (file)
@@ -266,7 +266,11 @@ def run_process_media(entry, feed_url=None,
     entry, manager = get_entry_and_processing_manager(entry.id)
 
     try:
-        manager.workflow(entry.id, feed_url, reprocess_action, reprocess_info)
+        wf = manager.workflow(entry, feed_url, reprocess_action, reprocess_info)
+        if wf is None:
+            ProcessMedia().apply_async(
+                [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"
         # or always-eager-with-exceptions-propagated celery mode that