mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Put orphan search in cron--it works now. Not that there were any.
This commit is contained in:
parent
09d37c4426
commit
951bc3b030
2 changed files with 6 additions and 1 deletions
|
|
@ -2,3 +2,7 @@ cron:
|
|||
- description: cleanup job
|
||||
url: /r3m0v3r
|
||||
schedule: every 2 hours
|
||||
|
||||
- description: orphan cleanup job
|
||||
url: /r3m0v3rOrphans
|
||||
schedule: every 4 hours
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue