Skip to content

Commit

Permalink
Issue/564 transport cleanup (#644)
Browse files Browse the repository at this point in the history
* added bootloader
* split off session management
  • Loading branch information
wouterdb authored and bartv committed Jul 31, 2018
1 parent 7ab8890 commit e0982ca
Show file tree
Hide file tree
Showing 16 changed files with 1,226 additions and 925 deletions.
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 @@ -110,6 +110,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

0 comments on commit e0982ca

Please sign in to comment.