Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: app.py

Issue 11970045: Fix failure to write latest_rev updates to database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chromium-build
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from __future__ import with_statement 5 from __future__ import with_statement
6 6
7 import datetime 7 import datetime
8 import json 8 import json
9 import logging 9 import logging
10 import os 10 import os
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if not prev_rev or rev_number > prev_rev['rev_number']: 261 if not prev_rev or rev_number > prev_rev['rev_number']:
262 latest_rev_row = { 262 latest_rev_row = {
263 'rev_number': rev_number, 263 'rev_number': rev_number,
264 'fetch_timestamp': datetime.datetime.now(), 264 'fetch_timestamp': datetime.datetime.now(),
265 'rev': None, 265 'rev': None,
266 'name': None, 266 'name': None,
267 'status': None, 267 'status': None,
268 'comment': None, 268 'comment': None,
269 'details': None, 269 'details': None,
270 } 270 }
271 save_row(latest_rev_row, 'latest_rev') 271 prev_rev_db = get_or_create_row('latest_rev', rev_number)
272 prev_rev_db.fetch_timestamp = datetime.datetime.now()
273 prev_rev_db.rev_number = rev_number
274 prev_rev_db.put()
275 put_data_into_cache('latest_rev', latest_rev_row)
272 276
273 277
274 ########## 278 ##########
275 # ConsoleData class definition and related functions. 279 # ConsoleData class definition and related functions.
276 ########## 280 ##########
277 class ConsoleData(object): 281 class ConsoleData(object):
278 def __init__(self): 282 def __init__(self):
279 self.row_orderedkeys = [] 283 self.row_orderedkeys = []
280 self.row_data = {} 284 self.row_data = {}
281 285
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 # LKGR JSON. 1194 # LKGR JSON.
1191 { 1195 {
1192 'remoteurl': 1196 'remoteurl':
1193 ('http://build.chromium.org/p/chromium.lkgr/json/builders/Linux%20x64/' 1197 ('http://build.chromium.org/p/chromium.lkgr/json/builders/Linux%20x64/'
1194 'builds/-1?as_text=1'), 1198 'builds/-1?as_text=1'),
1195 'localpath': 1199 'localpath':
1196 'chromium.lkgr/json/builders/Linux%20x64/builds/-1/as_text=1.json', 1200 'chromium.lkgr/json/builders/Linux%20x64/builds/-1/as_text=1.json',
1197 'maxage': 2*60, # 2 mins 1201 'maxage': 2*60, # 2 mins
1198 }, 1202 },
1199 ] 1203 ]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698