summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-07-23 21:12:29 +0300
committermakkalot <makkalot@gmail.com>2008-07-23 21:12:29 +0300
commitf23cc9937dd425c35d4f032260baacacfb9b57fb (patch)
treeeb49e98e816ea829b1e139403c528918ce89185f
parent139f5ed5e09fdefd7b01b8c509888c417c50e72e (diff)
downloadfunc-f23cc9937dd425c35d4f032260baacacfb9b57fb.tar.gz
func-f23cc9937dd425c35d4f032260baacacfb9b57fb.tar.xz
func-f23cc9937dd425c35d4f032260baacacfb9b57fb.zip
change the minion db plurge thing for new ids
-rw-r--r--func/jobthing.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/func/jobthing.py b/func/jobthing.py
index b8fd1d7..71af983 100644
--- a/func/jobthing.py
+++ b/func/jobthing.py
@@ -57,7 +57,12 @@ def __purge_old_jobs(storage):
nowtime = time.time()
for x in storage.keys():
# minion jobs have "-minion" in the job id so disambiguation so we need to remove that
- jobkey = x.strip().split('-')[3]
+ jobkey = x.strip().split('-')
+ if len(jobkey) == 4:
+ jobkey = jobkey[3]
+ else:
+ jobkey = jobkey[0]
+
create_time = float(jobkey)
if nowtime - create_time > RETAIN_INTERVAL:
del storage[x]