Browse files

Added a favicon-specific queue

  • Loading branch information...
brutasse committed Mar 18, 2013
1 parent 1d03780 commit 19c089e355897fdb4f5cf0a16df613d1541e437f
Showing with 10 additions and 4 deletions.
  1. +1 −1 README.rst
  2. +9 −3 feedhq/feeds/
@@ -121,7 +121,7 @@ Note that additionally to the web server, you need to run one or more
consumers for the task queue. This is done with the ``rqworker`` management
- rqworker high default low
+ rqworker favicons high default low
The arguments are queue names. FeedHQ only uses the ``high`` and ``default``
queues but this is the pattern advertised by RQ and the low queue may be used
@@ -1,8 +1,9 @@
import logging
-from rq.timeouts import JobTimeoutException
+from django.db import DatabaseError
from django_push.subscriber.models import Subscription
+from rq.timeouts import JobTimeoutException
from ..tasks import raven, enqueue
@@ -37,10 +38,15 @@ def update_unique_feed(feed_url):
defaults={'subscribers': 1},
if created:
- enqueue(update_favicon, args=[feed_url], queue='high')
+ enqueue(update_favicon, args=[feed_url], queue='favicons')
feed.subscribers = Feed.objects.filter(url=feed_url).count()
+ try:
+ except DatabaseError as e:
+ # Possible concurrent update with a different UniqueFeed
+ if "Save with update_fields did not affect any rows" not in str(e):
+ raise

0 comments on commit 19c089e

Please sign in to comment.