Skip to content
Browse files

Now using .delay instead of apply_async on Celery tasks.

  • Loading branch information...
1 parent 70c230d commit c27e857e86515dbaaf9420189b9cb461ff5389ee @davbo davbo committed Mar 23, 2012
View
2 molly/apps/feeds/providers/ical.py
@@ -32,7 +32,7 @@ def import_data(self, **metadata):
from molly.apps.feeds.models import Feed
for feed in Feed.objects.filter(provider=self.class_path):
logger.debug("Importing: %s - %s" % (feed.title, feed.rss_url))
- self.import_feed.apply_async(args=(feed,))
+ self.import_feed.delay(feed)
return metadata
@task()
View
2 molly/apps/feeds/providers/rss.py
@@ -35,7 +35,7 @@ def import_data(self, **metadata):
from molly.apps.feeds.models import Feed
for feed in Feed.objects.filter(provider=self.class_path):
logger.debug("Importing: %s - %s" % (feed.title, feed.rss_url))
- self.import_feed.apply_async(args=(feed,))
+ self.import_feed.delay(feed)
return metadata
@task()
View
2 molly/apps/feeds/providers/talks_cam.py
@@ -26,7 +26,7 @@ def import_data(self, **metadata):
from molly.apps.feeds.models import Feed
for feed in Feed.objects.filter(provider=self.class_path):
logger.debug("Importing: %s - %s" % (feed.title, feed.rss_url))
- self.import_feed.apply_async(args=(feed,))
+ self.import_feed.delay(feed)
return metadata
@task()
View
3 molly/apps/podcasts/providers/rss.py
@@ -47,14 +47,15 @@ def import_data(self, **metadata):
podcast.medium = self.medium
podcast.slug = slug
- self.update_podcast(podcast)
+ self.update_podcast.delay(podcast)
def determine_license(self, o):
license = o.find('{http://purl.org/dc/terms/}license') or \
o.find('{http://backend.userland.com/creativeCommonsRssModule}license')
return getattr(license, 'text', None)
+ @task()
def update_podcast(self, podcast):
atom = self.atom
def gct(node, names):

0 comments on commit c27e857

Please sign in to comment.
Something went wrong with that request. Please try again.