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

Side by Side Diff: appengine/swarming/server/bot_management.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 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
OLDNEW
1 # Copyright 2014 The LUCI Authors. All rights reserved. 1 # Copyright 2014 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Swarming bot management, e.g. list of known bots and their state. 5 """Swarming bot management, e.g. list of known bots and their state.
6 6
7 +---------+ 7 +---------+
8 |BotRoot | 8 |BotRoot |
9 |id=bot_id| 9 |id=bot_id|
10 +---------+ 10 +---------+
11 | 11 |
12 +------+-------+---------------+---------+----- ... -----+ 12 +------+-------+---------------+---------+----- ... -----+
13 | | | | | 13 | | | | |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 Returns: 348 Returns:
349 Tuple (True to restart, text message explaining the reason). 349 Tuple (True to restart, text message explaining the reason).
350 """ 350 """
351 # Periodically reboot bots to workaround OS level leaks (especially on Win). 351 # Periodically reboot bots to workaround OS level leaks (especially on Win).
352 running_time = state.get('running_time', 0) 352 running_time = state.get('running_time', 0)
353 assert isinstance(running_time, (int, float)) 353 assert isinstance(running_time, (int, float))
354 period = get_bot_reboot_period(bot_id, state) 354 period = get_bot_reboot_period(bot_id, state)
355 if period and running_time > period: 355 if period and running_time > period:
356 return True, 'Periodic reboot: running longer than %ds' % period 356 return True, 'Periodic reboot: running longer than %ds' % period
357 return False, '' 357 return False, ''
OLDNEW
« no previous file with comments | « appengine/swarming/server/bot_code_test.py ('k') | appengine/swarming/server/bot_management_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698