Add exit on close

This commit is contained in:
VirtuBox
2019-08-17 20:29:55 +02:00
parent 11b4c0b046
commit 3118e50ff5
5 changed files with 10 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ class WOSiteController(CementBaseController):
label = 'site' label = 'site'
stacked_on = 'base' stacked_on = 'base'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = ('Performs website specific operations') description = ('Performs website specific operations')
arguments = [ arguments = [
(['site_name'], (['site_name'],
@@ -249,6 +250,7 @@ class WOSiteEditController(CementBaseController):
label = 'edit' label = 'edit'
stacked_on = 'site' stacked_on = 'site'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = ('Edit Nginx configuration of site') description = ('Edit Nginx configuration of site')
arguments = [ arguments = [
(['site_name'], (['site_name'],
@@ -302,6 +304,7 @@ class WOSiteCreateController(CementBaseController):
label = 'create' label = 'create'
stacked_on = 'site' stacked_on = 'site'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = ('this commands set up configuration and installs ' description = ('this commands set up configuration and installs '
'required files as options are provided') 'required files as options are provided')
arguments = [ arguments = [
@@ -806,6 +809,7 @@ class WOSiteUpdateController(CementBaseController):
label = 'update' label = 'update'
stacked_on = 'site' stacked_on = 'site'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = ('This command updates websites configuration to ' description = ('This command updates websites configuration to '
'another as per the options are provided') 'another as per the options are provided')
arguments = [ arguments = [
@@ -1742,6 +1746,7 @@ class WOSiteDeleteController(CementBaseController):
label = 'delete' label = 'delete'
stacked_on = 'site' stacked_on = 'site'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = 'delete an existing website' description = 'delete an existing website'
arguments = [ arguments = [
(['site_name'], (['site_name'],
@@ -1879,6 +1884,7 @@ class WOSiteListController(CementBaseController):
label = 'list' label = 'list'
stacked_on = 'site' stacked_on = 'site'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = 'List websites' description = 'List websites'
arguments = [ arguments = [
(['--enabled'], (['--enabled'],

View File

@@ -44,6 +44,7 @@ class WOStackController(CementBaseController):
label = 'stack' label = 'stack'
stacked_on = 'base' stacked_on = 'base'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = 'Stack command manages stack operations' description = 'Stack command manages stack operations'
arguments = [ arguments = [
(['--all'], (['--all'],

View File

@@ -12,6 +12,7 @@ class WOStackStatusController(CementBaseController):
label = 'stack_services' label = 'stack_services'
stacked_on = 'stack' stacked_on = 'stack'
stacked_type = 'embedded' stacked_type = 'embedded'
exit_on_close = True
description = 'Check the stack status' description = 'Check the stack status'
@expose(help="Start stack services") @expose(help="Start stack services")

View File

@@ -20,6 +20,7 @@ class WOStackUpgradeController(CementBaseController):
label = 'upgrade' label = 'upgrade'
stacked_on = 'stack' stacked_on = 'stack'
stacked_type = 'nested' stacked_type = 'nested'
exit_on_close = True
description = ('Upgrade stack safely') description = ('Upgrade stack safely')
arguments = [ arguments = [
(['--all'], (['--all'],

View File

@@ -24,6 +24,7 @@ class Log:
if exit: if exit:
self.app.close(1) self.app.close(1)
def info(self, msg, end='\n', log=True): def info(self, msg, end='\n', log=True):
""" """
Logs info messages into log file Logs info messages into log file