Setup the Git Manager in the main application

This commit is contained in:
Stefan Haun 2021-02-11 20:59:18 +01:00
parent 234421fb64
commit f9a7d7fe21

7
app.py
View file

@ -12,6 +12,7 @@ import json
import util import util
from auth import AuthProvider from auth import AuthProvider
from gitmgr import GitManagerConfiguration, GitManager
startup_timestamp = datetime.now() startup_timestamp = datetime.now()
@ -83,10 +84,16 @@ def main():
# Setup # Setup
auth_provider = AuthProvider.from_environment() auth_provider = AuthProvider.from_environment()
gitcfg = GitManagerConfiguration.from_environment()
gitmgr = GitManager(configuration=gitcfg)
gitmgr.setup()
gitmgr.printout()
util.run_tornado_server(make_app(auth_provider), util.run_tornado_server(make_app(auth_provider),
server_port=port) server_port=port)
# Teardown # Teardown
gitmgr.teardown()
print("Server stopped") print("Server stopped")