From 8d8834ae7ad56be8c745bcf05dc9aedc7d3590e8 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 5 Mar 2013 13:37:09 -0500 Subject: [PATCH] increase granularity of time to be < 1 day. we were only sorting the list based on the integer day when things were happening, which just caused confusion. Make this a more strict time sort. Change-Id: Iccd228069707368c7da8d060486567d4b389e9b1 Reviewed-on: https://review.openstack.org/23587 Reviewed-by: Clark Boylan Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- modules/recheckwatch/files/recheckwatch | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/recheckwatch/files/recheckwatch b/modules/recheckwatch/files/recheckwatch index 6fa35ec36f..51836c20e1 100755 --- a/modules/recheckwatch/files/recheckwatch +++ b/modules/recheckwatch/files/recheckwatch @@ -138,13 +138,10 @@ class Scoreboard(threading.Thread): def impact(bug): """Golf rules for bugs, smaller the more urgent.""" - age = (now - bug.last_seen).days - - if not age: - age = 0.1 + age = (now - bug.last_seen).total_seconds() if bug.is_closed(): - age = age + 5.0 + age = age + (5.0 * 86400.0) return age