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

Fixes linkedin/simoorg#13 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions src/simoorg/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,23 @@
import simoorg.moirai as moi
import sys

if len(sys.argv) != 2:
print "Please provide config path"
exit(1)
CONFIG_PATH = sys.argv[1]

MOIRAI = moi.Moirai(CONFIG_PATH, verbose=True, debug=False)
def main():
if len(sys.argv) != 2:
print "Please provide config path"
exit(1)
CONFIG_PATH = sys.argv[1]

MOIRAI.spawn_atropos()
MOIRAI = moi.Moirai(CONFIG_PATH, verbose=True, debug=False)

for service_name, proc_handler in MOIRAI.atropos_army.iteritems():
print service_name, proc_handler.pid
MOIRAI.spawn_atropos()

# Wait for all the atropos to finish
for service_name, proc_handler in MOIRAI.atropos_army.iteritems():
print service_name, proc_handler.pid

MOIRAI.finish()
# Wait for all the atropos to finish

MOIRAI.finish()

if __name__ == '__main__':
main()