Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/564 transport cleanup #644

Merged
merged 15 commits into from
Jul 31, 2018
8 changes: 4 additions & 4 deletions src/inmanta/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
from inmanta.export import cfg_env, ModelExporter
from inmanta.ast import CompilerException
import yaml
from inmanta.server.bootloader import InmantaBootloader

LOGGER = logging.getLogger()


@command("server", help_msg="Start the inmanta server")
def start_server(options):
from inmanta import server
io_loop = IOLoop.current()

s = server.Server(io_loop)
s.start()
ibl = InmantaBootloader()
ibl.start()

try:
io_loop.start()
except KeyboardInterrupt:
IOLoop.current().stop()
s.stop()
ibl.stop()


@command("agent", help_msg="Start the inmanta agent")
Expand Down
1 change: 1 addition & 0 deletions src/inmanta/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def setup_server(self, no_agent_log):
args = [sys.executable, "-m", "inmanta.app", "-vvv", "-c", server_config, "server"]

self._server_proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

LOGGER.debug("Started server on port %d", self._server_port)

while self._server_proc.poll() is None:
Expand Down
Loading