mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +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:
|
if not bundle.sticky and self.category_id == default_category:
|
||||||
skippable = self.env['runbot.batch'].search([
|
skippable = self.env['runbot.batch'].search([
|
||||||
('bundle_id', '=', bundle.id),
|
('bundle_id', '=', bundle.id),
|
||||||
('state', '!=', 'done'),
|
('state', 'not in', ('done', 'skipped')),
|
||||||
('id', '<', self.id),
|
('id', '<', self.id),
|
||||||
('category_id', '=', default_category.id)
|
('category_id', '=', default_category.id)
|
||||||
])
|
])
|
||||||
|
@ -552,11 +552,11 @@ class Repo(models.Model):
|
|||||||
|
|
||||||
def _update(self, force=False, poll_delay=5*60):
|
def _update(self, force=False, poll_delay=5*60):
|
||||||
""" Update the physical git reposotories on FS"""
|
""" Update the physical git reposotories on FS"""
|
||||||
for repo in self:
|
self.ensure_one()
|
||||||
try:
|
try:
|
||||||
return repo._update_git(force, poll_delay)
|
return self._update_git(force, poll_delay)
|
||||||
except Exception:
|
except Exception:
|
||||||
_logger.exception('Fail to update repo %s', repo.name)
|
_logger.exception('Fail to update repo %s', self.name)
|
||||||
|
|
||||||
class RefTime(models.Model):
|
class RefTime(models.Model):
|
||||||
_name = 'runbot.repo.reftime'
|
_name = 'runbot.repo.reftime'
|
||||||
|
@ -7,7 +7,8 @@ _logger = logging.getLogger(__name__)
|
|||||||
class BuilderClient(RunbotClient):
|
class BuilderClient(RunbotClient):
|
||||||
|
|
||||||
def on_start(self):
|
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):
|
def loop_turn(self):
|
||||||
if self.count == 1: # cleanup at second iteration
|
if self.count == 1: # cleanup at second iteration
|
||||||
|
Loading…
Reference in New Issue
Block a user