From 951bc3b0307a3f83cdd9151211a870353544910e Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 3 Jun 2011 22:38:30 -0500 Subject: [PATCH] Put orphan search in cron--it works now. Not that there were any. --- cron.yaml | 4 ++++ utils/remover.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cron.yaml b/cron.yaml index 325ad87..c097e5c 100644 --- a/cron.yaml +++ b/cron.yaml @@ -2,3 +2,7 @@ cron: - description: cleanup job url: /r3m0v3r schedule: every 2 hours + +- description: orphan cleanup job + url: /r3m0v3rOrphans + schedule: every 4 hours diff --git a/utils/remover.py b/utils/remover.py index b0e5ec6..70af1b0 100644 --- a/utils/remover.py +++ b/utils/remover.py @@ -80,7 +80,7 @@ class RemoveOrphanDataChunks(webapp.RequestHandler): deleted = 0 num = 0 - results = chunks.fetch(200) + results = chunks.fetch(100) for d in results: ## This is the only way to test for orphans I could find. try: @@ -92,6 +92,7 @@ class RemoveOrphanDataChunks(webapp.RequestHandler): num += 1 if num == 0: memcache.delete('orphan_search_cursor') + logging.warn('Orphan search reached end, starting over next time.') else: memcache.set('orphan_search_cursor',chunks.cursor())