Skip to content

Commit

Permalink
Removed CELERY_USING hack.
Browse files Browse the repository at this point in the history
  • Loading branch information
melinath committed May 28, 2013
1 parent be5d454 commit 4ffa79f
Show file tree
Hide file tree
Showing 16 changed files with 162 additions and 253 deletions.
6 changes: 2 additions & 4 deletions localtv/admin/forms.py
Expand Up @@ -21,7 +21,7 @@

from localtv import models, utils
from localtv.settings import API_KEYS
from localtv.tasks import video_save_thumbnail, feed_update, CELERY_USING
from localtv.tasks import video_save_thumbnail, feed_update
from localtv.user_profile import forms as user_profile_forms

from vidscraper import auto_feed
Expand Down Expand Up @@ -66,8 +66,7 @@ def save(self, commit=True):
if (thumbnail_url and not
models.Video.objects.get(id=self.instance.id).thumbnail_url == thumbnail_url):
self.instance.thumbnail_url = thumbnail_url
video_save_thumbnail.delay(self.instance.pk,
using=CELERY_USING)
video_save_thumbnail.delay(self.instance.pk)
return forms.ModelForm.save(self, commit=commit)


Expand Down Expand Up @@ -1002,7 +1001,6 @@ def save(self, commit=True):
self.instance.name = self.instance.feed_url
instance = super(AddFeedForm, self).save(commit)
feed_update.delay(instance.pk,
using=CELERY_USING,
clear_rejected=True)
return instance

Expand Down
5 changes: 2 additions & 3 deletions localtv/management/commands/update_popularity.py
Expand Up @@ -18,10 +18,9 @@ def handle(self, **options):
return

since = options['since']
from localtv.tasks import haystack_batch_update, CELERY_USING
from localtv.tasks import haystack_batch_update

haystack_batch_update.delay(Video._meta.app_label,
Video._meta.module_name,
start=datetime.now() - timedelta(since),
date_lookup='watch__timestamp',
using=CELERY_USING)
date_lookup='watch__timestamp')
6 changes: 3 additions & 3 deletions localtv/management/commands/update_sources.py
Expand Up @@ -7,6 +7,6 @@ def handle_noargs(self, **options):
if site_too_old():
return

from localtv.tasks import update_sources, CELERY_USING
update_sources.delay(using=CELERY_USING)
from localtv.tasks import update_sources

update_sources.delay()

0 comments on commit 4ffa79f

Please sign in to comment.