[FIX] runbot: Use correct name of new parameters

This commit is contained in:
Moisés López 2018-03-27 19:11:35 -06:00 committed by Christophe Monniez
parent 8b4b941e06
commit 9de7c2f8cf
2 changed files with 6 additions and 6 deletions

View File

@ -349,7 +349,7 @@ class runbot_build(models.Model):
# starting port
icp = self.env['ir.config_parameter']
port = int(icp.get_param('runbot.starting_port', default=2000))
port = int(icp.get_param('runbot.runbot_starting_port', default=2000))
# find next free port
while port in ports:
@ -368,7 +368,7 @@ class runbot_build(models.Model):
icp = self.env['ir.config_parameter']
# For retro-compatibility, keep this parameter in seconds
default_timeout = int(icp.get_param('runbot.timeout', default=1800)) / 60
default_timeout = int(icp.get_param('runbot.runbot_timeout', default=1800)) / 60
for build in self:
if build.state == 'deathrow':

View File

@ -122,7 +122,7 @@ class runbot_repo(models.Model):
_logger.debug('repo %s updating branches', repo.name)
icp = self.env['ir.config_parameter']
max_age = int(icp.get_param('runbot.max_age', default=30))
max_age = int(icp.get_param('runbot.runbot_max_age', default=30))
Build = self.env['runbot.build']
Branch = self.env['runbot.branch']
@ -209,7 +209,7 @@ class runbot_repo(models.Model):
# skip old builds (if their sequence number is too low, they will not ever be built)
skippable_domain = [('repo_id', '=', repo.id), ('state', '=', 'pending')]
icp = self.env['ir.config_parameter']
running_max = int(icp.get_param('runbot.running_max', default=75))
running_max = int(icp.get_param('runbot.runbot_running_max', default=75))
builds_to_be_skipped = Build.search(skippable_domain, order='sequence desc', offset=running_max)
builds_to_be_skipped._skip()
@ -224,8 +224,8 @@ class runbot_repo(models.Model):
def _scheduler(self, ids=None):
"""Schedule builds for the repository"""
icp = self.env['ir.config_parameter']
workers = int(icp.get_param('runbot.workers', default=6))
running_max = int(icp.get_param('runbot.running_max', default=75))
workers = int(icp.get_param('runbot.runbot_workers', default=6))
running_max = int(icp.get_param('runbot.runbot_running_max', default=75))
host = fqdn()
Build = self.env['runbot.build']