mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: forbid wake-up on dead builds
When a build is completely dead, with directory and db deleted, the wake-up system fails. With this commit, a wake-up is not allowed on such dead builds.
This commit is contained in:
parent
c3e23532be
commit
dcf3297bff
@ -543,6 +543,9 @@ class runbot_build(models.Model):
|
||||
if docker_is_running(build._get_docker_name()):
|
||||
build.write({'requested_action': False, 'local_state': 'running'})
|
||||
build._log('wake_up', 'Waking up failed, docker is already running', level='SEPARATOR')
|
||||
elif not os.path.exists(build._path()):
|
||||
build.write({'requested_action': False, 'local_state': 'done'})
|
||||
build._log('wake_up', 'Impossible to wake-up, build dir does not exists anymore', level='SEPARATOR')
|
||||
else:
|
||||
log_path = build._path('logs', 'wake_up.txt')
|
||||
build.write({'job_start': now(), 'job_end': False, 'active_step': False, 'requested_action': False, 'local_state': 'running'})
|
||||
|
Loading…
Reference in New Issue
Block a user