Have the build manager sleep if the requested manager is external
This commit is contained in:
parent
72d613614d
commit
5cb36fe053
1 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import logging
|
||||
import os
|
||||
import features
|
||||
import time
|
||||
|
||||
from app import app, userfiles as user_files, build_logs, dockerfile_build_queue
|
||||
|
||||
|
@ -15,6 +16,8 @@ BUILD_MANAGERS = {
|
|||
'enterprise': EnterpriseManager
|
||||
}
|
||||
|
||||
EXTERNALLY_MANAGED = 'external'
|
||||
|
||||
def run_build_manager():
|
||||
if not features.BUILD_SUPPORT:
|
||||
logger.debug('Building is disabled. Please enable the feature flag')
|
||||
|
@ -24,6 +27,13 @@ def run_build_manager():
|
|||
if build_manager_config is None:
|
||||
return
|
||||
|
||||
# If the build system is externally managed, then we just sleep this process.
|
||||
if build_manager_config[0] == EXTERNALLY_MANAGED:
|
||||
logger.debug('Builds are externally managed.')
|
||||
while True:
|
||||
time.sleep(1000)
|
||||
return
|
||||
|
||||
logger.debug('Asking to start build manager with lifecycle "%s"', build_manager_config[0])
|
||||
manager_klass = BUILD_MANAGERS.get(build_manager_config[0])
|
||||
if manager_klass is None:
|
||||
|
|
Reference in a new issue