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

Side by Side Diff: scheduler/scheduler_config.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « scheduler/monitor_db_cleanup_test.py ('k') | server/frontend.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import common 1 import common
2 from autotest_lib.client.common_lib import global_config 2 from autotest_lib.client.common_lib import global_config
3 3
4 CONFIG_SECTION = 'SCHEDULER' 4 CONFIG_SECTION = 'SCHEDULER'
5 5
6 class SchedulerConfig(object): 6 class SchedulerConfig(object):
7 """ 7 """
8 Contains configuration that can be changed during scheduler execution. 8 Contains configuration that can be changed during scheduler execution.
9 """ 9 """
10 FIELDS = {'max_processes_per_drone': 'max_processes_per_drone', 10 FIELDS = {'max_processes_per_drone': 'max_processes_per_drone',
11 'max_processes_started_per_cycle': 'max_jobs_started_per_cycle', 11 'max_processes_started_per_cycle': 'max_jobs_started_per_cycle',
12 'clean_interval': 'clean_interval_minutes', 12 'clean_interval': 'clean_interval_minutes',
13 'max_parse_processes': 'max_parse_processes', 13 'max_parse_processes': 'max_parse_processes',
14 'tick_pause_sec': 'tick_pause_sec', 14 'tick_pause_sec': 'tick_pause_sec',
15 'max_transfer_processes': 'max_transfer_processes', 15 'max_transfer_processes': 'max_transfer_processes',
16 'secs_to_wait_for_atomic_group_hosts': 16 'secs_to_wait_for_atomic_group_hosts':
17 'secs_to_wait_for_atomic_group_hosts', 17 'secs_to_wait_for_atomic_group_hosts',
18 'reverify_period_minutes': 'reverify_period_minutes', 18 'reverify_period_minutes': 'reverify_period_minutes',
19 'reverify_max_hosts_at_once': 'reverify_max_hosts_at_once',
19 } 20 }
20 21
21 22
22 def __init__(self): 23 def __init__(self):
23 self.read_config() 24 self.read_config()
24 25
25 26
26 def read_config(self): 27 def read_config(self):
27 config = global_config.global_config 28 config = global_config.global_config
28 config.parse_config_file() 29 config.parse_config_file()
29 for field, config_option in self.FIELDS.iteritems(): 30 for field, config_option in self.FIELDS.iteritems():
30 setattr(self, field, config.get_config_value(CONFIG_SECTION, 31 setattr(self, field, config.get_config_value(CONFIG_SECTION,
31 config_option, 32 config_option,
32 type=int)) 33 type=int))
33 34
34 35
35 config = SchedulerConfig() 36 config = SchedulerConfig()
OLDNEW
« no previous file with comments | « scheduler/monitor_db_cleanup_test.py ('k') | server/frontend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698