Don't pass request into run_process_media

People(tm) want to start run_process_media from the CLI and might not
have a request object handy. So pass in the feed_url into
run_process_media rather than the request object and allow the feed url
to be empty (resulting in no PuSH notification at all then).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2013-01-15 15:03:00 +01:00
parent 2cfffd5ed8
commit c7b3d070b6
4 changed files with 18 additions and 7 deletions

View File

@@ -94,7 +94,8 @@ class ProcessMedia(task.Task):
entry.save()
# Notify the PuSH servers as async task
handle_push_urls.subtask().delay(feed_url)
if mgg.app_config["push_urls"] and feed_url:
handle_push_urls.subtask().delay(feed_url)
json_processing_callback(entry)
except BaseProcessingFail as exc: