mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: reduce load when builder are idle
The sleep 1 was ok with a few builder bur regarding the number of request on the database when no build are running, this become problematic. An ideal solution would be to detect if -> me managed some testing build -> There is load (pendings) In both case, we don't want to sleep to much. In other cases, we may want to wait a little longer. A simple quick fix will just wait longer in all cases.
This commit is contained in:
parent
b44ed5f7a6
commit
e91611b0f8
@ -273,7 +273,7 @@ class Runbot(models.AbstractModel):
|
||||
|
||||
return manager.get('sleep', default_sleep)
|
||||
|
||||
def _scheduler_loop_turn(self, host, default_sleep=1):
|
||||
def _scheduler_loop_turn(self, host, default_sleep=5):
|
||||
_logger.info('Scheduling...')
|
||||
with self.manage_host_exception(host) as manager:
|
||||
self._scheduler(host)
|
||||
|
Loading…
Reference in New Issue
Block a user