Skip to content

Commit

Permalink
discard week+ old results w/message
Browse files Browse the repository at this point in the history
  • Loading branch information
Titus Brown committed Nov 24, 2009
1 parent f07b41a commit 8663c92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pony_build/coordinator.py
Expand Up @@ -168,13 +168,15 @@ def _process_results(self):
now = datetime.now()
a_week = timedelta(days=7)

discarded_count = 0
for k in keys:
(receipt, client_info, results_list) = self.db[k]

t = receipt['time']
t = datetime.fromtimestamp(t)

if now - t > a_week:
discarded_count += 1
#print 'discarding', receipt['result_key'], '-- over a week old'
continue

Expand All @@ -194,6 +196,8 @@ def _process_results(self):
l.append(k)
packages[pkg] = l

print 'discarded', discarded_count, 'week+-old results of', len(keys)

def db_get_result_info(self, result_id):
return self.db[result_id]

Expand Down

0 comments on commit 8663c92

Please sign in to comment.