mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot: make stats when build timeout
The stats are only kept when the build finishes, this makes sence to avoid collecting stats of a manually killed build (or because of newer build found), but the stats mays be interresting when the build timeouts. Adding a manual collection of stats in this case.
This commit is contained in:
parent
9660cf6517
commit
e50c76c0b5
@ -736,6 +736,7 @@ class BuildResult(models.Model):
|
||||
if _docker_state == 'RUNNING':
|
||||
timeout = min(build.active_step.cpu_limit, int(icp.get_param('runbot.runbot_timeout', default=10000)))
|
||||
if build.local_state != 'running' and build.job_time > timeout:
|
||||
build.active_step._make_stats(build)
|
||||
build._log('_schedule', '%s time exceeded (%ss)' % (build.active_step.name if build.active_step else "?", build.job_time))
|
||||
build._kill(result='killed')
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user