From 25e4724bacf2e7942d1197b740d750cea633cbd7 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 17 Sep 2017 04:22:57 +0530 Subject: [PATCH] A few more mitogen.slave/master changes --- docs/api.rst | 2 +- examples/ansible_demo.py | 2 +- tests/data/self_contained_program.py | 2 +- tests/data/webproject/serve_django_app.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 81533558..938fb186 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -12,7 +12,7 @@ mitogen Package .. automodule:: mitogen -.. autodata:: mitogen.slave +.. autodata:: mitogen.master .. autodata:: mitogen.context_id .. autodata:: mitogen.parent_id diff --git a/examples/ansible_demo.py b/examples/ansible_demo.py index c1406703..a243328d 100644 --- a/examples/ansible_demo.py +++ b/examples/ansible_demo.py @@ -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) diff --git a/tests/data/self_contained_program.py b/tests/data/self_contained_program.py index f3a82ce3..14a94b8e 100644 --- a/tests/data/self_contained_program.py +++ b/tests/data/self_contained_program.py @@ -18,5 +18,5 @@ def main(): broker.shutdown() broker.join() -if __name__ == '__main__' and not mitogen.slave: +if __name__ == '__main__' and mitogen.master: main() diff --git a/tests/data/webproject/serve_django_app.py b/tests/data/webproject/serve_django_app.py index 31eae9ad..bc1a36f9 100644 --- a/tests/data/webproject/serve_django_app.py +++ b/tests/data/webproject/serve_django_app.py @@ -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)