mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] runbot: various FIX
This commit is contained in:
parent
26a3ad20f1
commit
cbfc8401a8
@ -343,7 +343,7 @@ class Batch(models.Model):
|
||||
if not bundle.sticky and self.category_id == default_category:
|
||||
skippable = self.env['runbot.batch'].search([
|
||||
('bundle_id', '=', bundle.id),
|
||||
('state', '!=', 'done'),
|
||||
('state', 'not in', ('done', 'skipped')),
|
||||
('id', '<', self.id),
|
||||
('category_id', '=', default_category.id)
|
||||
])
|
||||
|
@ -552,11 +552,11 @@ class Repo(models.Model):
|
||||
|
||||
def _update(self, force=False, poll_delay=5*60):
|
||||
""" Update the physical git reposotories on FS"""
|
||||
for repo in self:
|
||||
try:
|
||||
return repo._update_git(force, poll_delay)
|
||||
except Exception:
|
||||
_logger.exception('Fail to update repo %s', repo.name)
|
||||
self.ensure_one()
|
||||
try:
|
||||
return self._update_git(force, poll_delay)
|
||||
except Exception:
|
||||
_logger.exception('Fail to update repo %s', self.name)
|
||||
|
||||
class RefTime(models.Model):
|
||||
_name = 'runbot.repo.reftime'
|
||||
|
@ -7,7 +7,8 @@ _logger = logging.getLogger(__name__)
|
||||
class BuilderClient(RunbotClient):
|
||||
|
||||
def on_start(self):
|
||||
self.env['runbot.repo'].search([('mode', '!=', 'disabled')])._update(force=True)
|
||||
for repo in self.env['runbot.repo'].search([('mode', '!=', 'disabled')]):
|
||||
repo._update(force=True)
|
||||
|
||||
def loop_turn(self):
|
||||
if self.count == 1: # cleanup at second iteration
|
||||
|
Loading…
Reference in New Issue
Block a user