Skip to content

Commit

Permalink
Development command for starting all parts of pyCA
Browse files Browse the repository at this point in the history
This patch adds an additional `all` command which starts all pyCA
services (like `run` would), plus the internal web server to deliver the
user interface.
  • Loading branch information
lkiesow committed Oct 2, 2021
1 parent 7391392 commit 410f3d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pyca/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
COMMANDS:
run -- Start all pyCA components except ui (default)
all -- Start all components (for testing only)
capture -- Start pyCA capture service
ingest -- Start pyCA ingest service
schedule -- Start pyCA schedule service
Expand Down Expand Up @@ -105,6 +106,14 @@ def main():
# ensure database is created first
get_session().close()
run_all(schedule, capture, ingest, agentstate)
elif cmd == 'all':
get_session().close()
signal.signal(signal.SIGINT, signal.default_int_handler)
multiprocessing.Process(
target=ui.app.run,
kwargs={'threaded': False}
).start()
run_all(schedule, capture, ingest, agentstate)
elif cmd == 'schedule':
schedule.run()
elif cmd == 'capture':
Expand Down

0 comments on commit 410f3d2

Please sign in to comment.