Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Fixes for interface spawner
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyjrobins committed Sep 21, 2018
1 parent f639162 commit a7fb935
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions start_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ def convert_host_port(args):
args = parse_args()

walkoff.config.initialize(args.config)
app = create_app()
app = create_app(interface_app=True)

walkoff.config.Config.WORKFLOW_RESULTS_HANDLER = 'kafka'
receiver = make_results_receiver()
receiver_thread = threading.Thread(target=receiver.receive_results)
receiver_thread.start()

try:
run(args, app, *convert_host_port(args))
run(app, *convert_host_port(args))
except KeyboardInterrupt:
logger.info('Caught KeyboardInterrupt! Please wait a few seconds for WALKOFF interface server to shutdown.')
receiver.thread_exit = True
Expand Down
5 changes: 2 additions & 3 deletions walkoff/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ def add_health_check(_app):

def create_app(interface_app=False):
if not interface_app:
app = connexion.App(__name__, specification_dir='../api/')
_app = connexion.App(__name__, specification_dir='../api/').app
else:
app = Flask(__name__)
_app = Flask(__name__)

_app = app.app
_app.jinja_loader = FileSystemLoader(['walkoff/templates'])
_app.config.from_object(walkoff.config.Config)

Expand Down

0 comments on commit a7fb935

Please sign in to comment.