mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] runbot: apply small fixes
This commit is contained in:
parent
d534f5a5e2
commit
c006bf953d
@ -372,7 +372,7 @@ class Runbot(models.AbstractModel):
|
||||
"""
|
||||
cleanup and optimize git repositories on the host
|
||||
"""
|
||||
for repo in self.env['runbot.repo'].search():
|
||||
for repo in self.env['runbot.repo'].search([]):
|
||||
try:
|
||||
repo._git(['gc', '--prune=all', '--quiet'])
|
||||
except CalledProcessError as e:
|
||||
|
@ -11,12 +11,15 @@ class LeaderClient(RunbotClient): # Conductor, Director, Main, Maestro, Lead
|
||||
super().__init__(env)
|
||||
|
||||
def on_start(self):
|
||||
self.env['runbot.repo'].search([('mode', '!=', 'disabled')])._update(force=True)
|
||||
_logger.info('Updating all repos')
|
||||
for repo in self.env['runbot.repo'].search([('mode', '!=', 'disabled')]):
|
||||
repo._update(force=True)
|
||||
_logger.info('update finished')
|
||||
|
||||
def loop_turn(self):
|
||||
if self.count == 0:
|
||||
self.env['runbot.repo']._update_git_config()
|
||||
self.git_gc()
|
||||
self.git_gc()
|
||||
return self.env['runbot.runbot']._fetch_loop_turn(self.host, self.pull_info_failures)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user