diff options
| author | jasplin <qt-info@nokia.com> | 2011-02-04 13:31:49 +0100 |
|---|---|---|
| committer | jasplin <qt-info@nokia.com> | 2011-02-04 13:31:49 +0100 |
| commit | 9186071af071fef29bf5aeb320fe61b2f7e2dc2b (patch) | |
| tree | af7f6085a8b5db832508b9fb197905394efea063 /scripts | |
| parent | 4675894b027d2f18bf214b95a6d07da264e37dff (diff) | |
Fixed bugs.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/finalizeresults.py | 3 | ||||
| -rw-r--r-- | scripts/misc.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/finalizeresults.py b/scripts/finalizeresults.py index 70d73ba..8db293c 100755 --- a/scripts/finalizeresults.py +++ b/scripts/finalizeresults.py @@ -188,7 +188,8 @@ def updateRankings(host_id, platform_id, branch_id, sha1_id, context_id): # conditions eventually becomes True: force_cond = empty_cond = interval_cond = False - force_ranking = False # Used for testing + force_ranking = False + #force_ranking = True # Uncomment for testing force_cond = force_ranking diff --git a/scripts/misc.py b/scripts/misc.py index 564d8d3..a74c0ad 100644 --- a/scripts/misc.py +++ b/scripts/misc.py @@ -151,7 +151,7 @@ def getAllSnapshots(host_id, platform_id, branch_id, reverse = False): # (-1, -1) if no match is found. def getLastRankingSnapshot(host_id, platform_id, branch_id): result = execQuery( - "SELECT matchingcontext.sha1id, timestamp" + "SELECT matchingcontext.sha1id, EXTRACT(EPOCH FROM timestamp)::INT" " FROM ranking," " (SELECT id, sha1Id, timestamp" " FROM context" @@ -162,7 +162,7 @@ def getLastRankingSnapshot(host_id, platform_id, branch_id): " ORDER BY timestamp DESC LIMIT 1;" % (host_id, platform_id, branch_id)) if len(result): - return query_result[0] + return result[0] return -1, -1 |
