Skip to content

Instantly share code, notes, and snippets.

@melinath
Created February 6, 2012 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melinath/1754986 to your computer and use it in GitHub Desktop.
Save melinath/1754986 to your computer and use it in GitHub Desktop.
Deployment changes
...
CELERY_IMPORTS = ('mainsite_project.celeryd_setup',)
...
import logging
from localtv import tasks
from localtv_mainsite.task_settings import patch_task_settings
TASK_NAMES = (
'update_sources', 'feed_update', 'search_update', 'mark_import_pending',
'mark_import_complete', 'video_from_vidscraper_video',
'video_save_thumbnail', 'haystack_update_index'
)
for task_name in TASK_NAMES:
task = getattr(tasks, task_name)
setattr(tasks, task_name, patch_task_settings(task))
logging.debug("tasks patched to use dynamic settings.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment