mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-12 12:02:50 +08:00
Put orphan search in cron--it works now. Not that there were any.
This commit is contained in:
@@ -2,3 +2,7 @@ cron:
|
||||
- description: cleanup job
|
||||
url: /r3m0v3r
|
||||
schedule: every 2 hours
|
||||
|
||||
- description: orphan cleanup job
|
||||
url: /r3m0v3rOrphans
|
||||
schedule: every 4 hours
|
||||
|
||||
+2
-1
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user