Browse files

More sensible queue limits

git-svn-id: https://potato.codebasehq.com/getfavicon/getfavicon.svn/trunk@31 0c1c7bd3-9391-4859-b94e-4e2dcdc6a516
  • Loading branch information...
1 parent d1bcbff commit 20fe57ade5e8341f374384c65cb417cc4657f537 jason committed Nov 14, 2010
Showing with 4 additions and 3 deletions.
  1. +2 −2 main.py
  2. +2 −1 queue.yaml
View
4 main.py
@@ -60,7 +60,7 @@ class cleanup(BaseHandler):
def get(self):
- for i in range(25):
+ for i in range(5):
taskqueue.add(
queue_name='doCleanup',
url='/_doCleanup',
@@ -77,7 +77,7 @@ def get(self):
# Cleanup DS cache
iconCacheCleanQuery = favIcon.gql("where dateCreated < :1",datetime.now()-timedelta(days=DS_CACHE_TIME))
- iconCacheCleanResults = iconCacheCleanQuery.fetch(200)
+ iconCacheCleanResults = iconCacheCleanQuery.fetch(100)
db.delete(iconCacheCleanResults)
inf("Deleted %d old icon caches in DS" % len(iconCacheCleanResults))
View
3 queue.yaml
@@ -1,3 +1,4 @@
queue:
- name: doCleanup
- rate: 1/s
+ rate: 10/m
+ bucket_size: 2

0 comments on commit 20fe57a

Please sign in to comment.