diff options
author | Yunlian Jiang <yunlian@google.com> | 2015-02-26 10:25:11 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-02-27 22:22:29 +0000 |
commit | a8446712a67f5a5d422ef1cbc40f72f4f9c4ae52 (patch) | |
tree | e036428f3cff765641645f08dfc38712a3ec9764 /crosperf/machine_manager.py | |
parent | fe054f1eac0d0d739b74dee6bd45805af86568a2 (diff) | |
download | toolchain-utils-a8446712a67f5a5d422ef1cbc40f72f4f9c4ae52.tar.gz |
crosperf: fix the problem on machine assignment.
BUG=chromium:461628
TEST=it always reuses the image on the machine for test shown in bug.
Change-Id: I8106eaa31395db3ee95507b2a9cd7ed0439bc890
Reviewed-on: https://chrome-internal-review.googlesource.com/202667
Reviewed-by: Caroline Tice <cmtice@google.com>
Commit-Queue: Yunlian Jiang <yunlian@google.com>
Tested-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'crosperf/machine_manager.py')
-rw-r--r-- | crosperf/machine_manager.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crosperf/machine_manager.py b/crosperf/machine_manager.py index dede640d..ad214a27 100644 --- a/crosperf/machine_manager.py +++ b/crosperf/machine_manager.py @@ -379,7 +379,11 @@ class MachineManager(object): # code and can implement minimal reimaging code more cleanly. for m in [machine for machine in self.GetAvailableMachines(label) if not machine.locked]: - if time.time() - m.released_time > 20: + if time.time() - m.released_time > 15: + # The release time gap is too large, so it is probably in the start + # stage, we need to reset the released_time. + m.released_time = time.time() + elif time.time() - m.released_time > 8: m.locked = True m.test_run = threading.current_thread() return m |