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

Unified Diff: scheduler/drone_utility.py

Issue 4823005: Merge remote branch 'cros/upstream' into tempbranch (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: patch Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scheduler/drone_manager.py ('k') | scheduler/monitor_db.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/drone_utility.py
diff --git a/scheduler/drone_utility.py b/scheduler/drone_utility.py
index 55b0a6b82e884611c9b1658a2a8e6e10c18c8f9e..c84a033de08f2f09d667c3527fc735dde6cf58c0 100755
--- a/scheduler/drone_utility.py
+++ b/scheduler/drone_utility.py
@@ -103,13 +103,15 @@ class DroneUtility(object):
for line_components in split_lines)
- def _refresh_processes(self, command_name, open=open):
+ def _refresh_processes(self, command_name, open=open,
+ site_check_parse=None):
# The open argument is used for test injection.
check_mark = global_config.global_config.get_config_value(
'SCHEDULER', 'check_processes_for_dark_mark', bool, False)
processes = []
for info in self._get_process_info():
- if info['comm'] == command_name:
+ is_parse = (site_check_parse and site_check_parse(info))
+ if info['comm'] == command_name or is_parse:
if (check_mark and not
self._check_pid_for_dark_mark(info['pid'], open=open)):
self._warn('%(comm)s process pid %(pid)s has no '
@@ -148,10 +150,14 @@ class DroneUtility(object):
* pidfiles_second_read: same info as pidfiles, but gathered after the
processes are scanned.
"""
+ site_check_parse = utils.import_site_function(
+ __file__, 'autotest_lib.scheduler.site_drone_utility',
+ 'check_parse', lambda x: False)
results = {
'pidfiles' : self._read_pidfiles(pidfile_paths),
'autoserv_processes' : self._refresh_processes('autoserv'),
- 'parse_processes' : self._refresh_processes('parse'),
+ 'parse_processes' : self._refresh_processes(
+ 'parse', site_check_parse=site_check_parse),
'pidfiles_second_read' : self._read_pidfiles(pidfile_paths),
}
return results
« no previous file with comments | « scheduler/drone_manager.py ('k') | scheduler/monitor_db.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698