mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot: add some log
This commit is contained in:
parent
7606c03c35
commit
9ae816a23d
@ -748,13 +748,14 @@ class runbot_repo(models.Model):
|
||||
pass
|
||||
|
||||
def _docker_cleanup(self):
|
||||
_logger.info('Docker cleaning')
|
||||
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:
|
||||
candidates = self.env['runbot.build'].search([('id', 'in', list(containers.keys())), ('local_state', '=', 'done')])
|
||||
for c in candidates:
|
||||
_logger.info('container %s found running with build state done', containers[c.id])
|
||||
docker_stop(containers[c.id])
|
||||
docker_stop(containers[c.id], c._path())
|
||||
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)))
|
||||
|
@ -37,6 +37,7 @@ class RunbotClient():
|
||||
self.env['runbot.build']._local_cleanup()
|
||||
self.env['runbot.repo']._docker_cleanup()
|
||||
host.set_psql_conn_count()
|
||||
_logger.debug('Scheduling...')
|
||||
count += 1
|
||||
sleep_time = self.env['runbot.repo']._scheduler_loop_turn(host)
|
||||
host.last_end_loop = fields.Datetime.now()
|
||||
|
Loading…
Reference in New Issue
Block a user