mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 05:15:45 +07:00
[IMP] runbot: add message if docker does not match dest format
This commit is contained in:
parent
702a52464d
commit
8284c7270d
@ -577,12 +577,16 @@ class runbot_repo(models.Model):
|
|||||||
self.env['runbot.build']._local_cleanup()
|
self.env['runbot.build']._local_cleanup()
|
||||||
|
|
||||||
# 3. docker cleanup
|
# 3. docker cleanup
|
||||||
containers = {int(dc.split('-', 1)[0]):dc for dc in docker_ps() if dest_reg.match(dc)}
|
docker_ps_result = docker_ps()
|
||||||
|
containers = {int(dc.split('-', 1)[0]):dc for dc in docker_ps_result if dest_reg.match(dc)}
|
||||||
if containers:
|
if containers:
|
||||||
candidates = self.env['runbot.build'].search([('id', 'in', list(containers.keys())), ('local_state', '=', 'done')])
|
candidates = self.env['runbot.build'].search([('id', 'in', list(containers.keys())), ('local_state', '=', 'done')])
|
||||||
for c in candidates:
|
for c in candidates:
|
||||||
_logger.info('container %s found running with build state done', containers[c.id])
|
_logger.info('container %s found running with build state done', containers[c.id])
|
||||||
docker_stop(containers[c.id])
|
docker_stop(containers[c.id])
|
||||||
|
ignored = {dc for dc in docker_ps_result if not dest_reg.match(dc)}
|
||||||
|
if ignored:
|
||||||
|
_logger.debug('docker (%s) not deleted because not dest format', " ".join(list(ignored)))
|
||||||
|
|
||||||
timeout = self._get_cron_period()
|
timeout = self._get_cron_period()
|
||||||
icp = self.env['ir.config_parameter']
|
icp = self.env['ir.config_parameter']
|
||||||
|
Loading…
Reference in New Issue
Block a user