A few more mitogen.slave/master changes

This commit is contained in:
David Wilson 2017-09-17 04:22:57 +05:30
parent 708b742a9c
commit 25e4724bac
4 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ mitogen Package
.. automodule:: mitogen
.. autodata:: mitogen.slave
.. autodata:: mitogen.master
.. autodata:: mitogen.context_id
.. autodata:: mitogen.parent_id

View File

@ -106,5 +106,5 @@ def main(router):
for x in xrange(10):
print context.call(run_module, 'ansible.modules.core.commands.command', 'hostname')
if __name__ == '__main__' and not mitogen.slave:
if __name__ == '__main__' and mitogen.master:
mitogen.utils.run_with_router(main)

View File

@ -18,5 +18,5 @@ def main():
broker.shutdown()
broker.join()
if __name__ == '__main__' and not mitogen.slave:
if __name__ == '__main__' and mitogen.master:
main()

View File

@ -33,5 +33,5 @@ def main(broker):
#context.call(mitogen.utils.log_to_file, '/tmp/log')
context.call(serve_django_app, 'webproject.settings')
if __name__ == '__main__' and not mitogen.slave:
if __name__ == '__main__' and mitogen.master:
mitogen.utils.run_with_broker(main)