mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] higher sleep values
This commit is contained in:
parent
6fca88afa8
commit
c562dac84d
@ -287,10 +287,10 @@ class Runbot(models.AbstractModel):
|
|||||||
|
|
||||||
return manager.get('sleep', default_sleep)
|
return manager.get('sleep', default_sleep)
|
||||||
|
|
||||||
def _scheduler_loop_turn(self, host, sleep=5):
|
def _scheduler_loop_turn(self, host, sleep=10):
|
||||||
with self._manage_host_exception(host) as manager:
|
with self._manage_host_exception(host) as manager:
|
||||||
if self._scheduler(host):
|
if self._scheduler(host):
|
||||||
sleep = 0.1
|
sleep = 0.5
|
||||||
return manager.get('sleep', sleep)
|
return manager.get('sleep', sleep)
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
@ -311,7 +311,7 @@ class Runbot(models.AbstractModel):
|
|||||||
host.last_exception = str(e)
|
host.last_exception = str(e)
|
||||||
host.exception_count = 1
|
host.exception_count = 1
|
||||||
self._commit()
|
self._commit()
|
||||||
res['sleep'] = random.uniform(0, 3)
|
res['sleep'] = random.uniform(1, 5)
|
||||||
else:
|
else:
|
||||||
if host.last_exception:
|
if host.last_exception:
|
||||||
host.last_exception = ""
|
host.last_exception = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user