Commit 45c23e82 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: do not always deploy instance at startup

parent e0e6ea1e
...@@ -13,6 +13,7 @@ import sys ...@@ -13,6 +13,7 @@ import sys
from slapos.runner.utils import runInstanceWithLock from slapos.runner.utils import runInstanceWithLock
from slapos.runner.views import * from slapos.runner.views import *
TRUE_VALUES = (1, '1', True, 'true', 'True')
class Config: class Config:
def __init__(self): def __init__(self):
...@@ -112,6 +113,7 @@ def serve(config): ...@@ -112,6 +113,7 @@ def serve(config):
os.mkdir(software_link) os.mkdir(software_link)
setHandler() setHandler()
config.logger.info('Running slapgrid...') config.logger.info('Running slapgrid...')
if app.config['auto_deploy_instance'] in TRUE_VALUES:
runInstanceWithLock(app.config) runInstanceWithLock(app.config)
config.logger.info('Done.') config.logger.info('Done.')
app.wsgi_app = ProxyFix(app.wsgi_app) app.wsgi_app = ProxyFix(app.wsgi_app)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment