Allow the individual build manager types to specify how long the queue should wait before retring a job that fails to schedule.
This commit is contained in:
parent
a99414b222
commit
d31e25d5cd
4 changed files with 28 additions and 19 deletions
|
@ -8,6 +8,7 @@ from buildman.manager.basemanager import BaseManager
|
|||
from trollius import From, Return, coroutine
|
||||
|
||||
REGISTRATION_REALM = 'registration'
|
||||
RETRY_TIMEOUT = 5
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class DynamicRegistrationComponent(BaseComponent):
|
||||
|
@ -61,13 +62,13 @@ class EnterpriseManager(BaseManager):
|
|||
def schedule(self, build_job):
|
||||
""" Schedules a build for an Enterprise Registry. """
|
||||
if self.shutting_down or not self.ready_components:
|
||||
raise Return(False)
|
||||
raise Return(False, RETRY_TIMEOUT)
|
||||
|
||||
component = self.ready_components.pop()
|
||||
|
||||
yield From(component.start_build(build_job))
|
||||
|
||||
raise Return(True)
|
||||
raise Return(True, None)
|
||||
|
||||
@coroutine
|
||||
def build_component_ready(self, build_component):
|
||||
|
|
Reference in a new issue