Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
1f99dcb4
Commit
1f99dcb4
authored
Sep 17, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix unbelievably dumb variable shadowing
parent
25e4724b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
docs/api.rst
docs/api.rst
+1
-1
docs/index.rst
docs/index.rst
+1
-1
mitogen/__init__.py
mitogen/__init__.py
+2
-2
mitogen/core.py
mitogen/core.py
+1
-1
tests/data/self_contained_program.py
tests/data/self_contained_program.py
+1
-1
tests/data/webproject/serve_django_app.py
tests/data/webproject/serve_django_app.py
+1
-1
No files found.
docs/api.rst
View file @
1f99dcb4
...
@@ -12,7 +12,7 @@ mitogen Package
...
@@ -12,7 +12,7 @@ mitogen Package
.. automodule:: mitogen
.. automodule:: mitogen
.. autodata:: mitogen.master
.. autodata:: mitogen.
is_
master
.. autodata:: mitogen.context_id
.. autodata:: mitogen.context_id
.. autodata:: mitogen.parent_id
.. autodata:: mitogen.parent_id
...
...
docs/index.rst
View file @
1f99dcb4
...
@@ -300,7 +300,7 @@ usual into the slave process.
...
@@ -300,7 +300,7 @@ usual into the slave process.
context = mitogen.ssh.connect(broker, sys.argv[1])
context = mitogen.ssh.connect(broker, sys.argv[1])
context.call(install_app)
context.call(install_app)
if __name__ == '__main__' and mitogen.master:
if __name__ == '__main__' and mitogen.
is_
master:
import mitogen.utils
import mitogen.utils
mitogen.utils.run_with_broker(main)
mitogen.utils.run_with_broker(main)
...
...
mitogen/__init__.py
View file @
1f99dcb4
...
@@ -16,11 +16,11 @@ be expected. On the slave, it is built dynamically during startup.
...
@@ -16,11 +16,11 @@ be expected. On the slave, it is built dynamically during startup.
#: context = mitogen.master.connect(broker)
#: context = mitogen.master.connect(broker)
#: context.call(do_work) # Causes slave to import __main__.
#: context.call(do_work) # Causes slave to import __main__.
#:
#:
#: if __name__ == '__main__' and mitogen.master:
#: if __name__ == '__main__' and mitogen.
is_
master:
#: import mitogen.utils
#: import mitogen.utils
#: mitogen.utils.run_with_broker(main)
#: mitogen.utils.run_with_broker(main)
#:
#:
master
=
True
is_
master
=
True
#: This is ``0`` in a master, otherwise it is a master-generated ID unique to
#: This is ``0`` in a master, otherwise it is a master-generated ID unique to
...
...
mitogen/core.py
View file @
1f99dcb4
...
@@ -1128,7 +1128,7 @@ class ExternalContext(object):
...
@@ -1128,7 +1128,7 @@ class ExternalContext(object):
mitogen
.
__package__
=
'mitogen'
mitogen
.
__package__
=
'mitogen'
mitogen
.
__path__
=
[]
mitogen
.
__path__
=
[]
mitogen
.
__loader__
=
self
.
importer
mitogen
.
__loader__
=
self
.
importer
mitogen
.
master
=
False
mitogen
.
is_
master
=
False
mitogen
.
context_id
=
context_id
mitogen
.
context_id
=
context_id
mitogen
.
parent_id
=
parent_id
mitogen
.
parent_id
=
parent_id
mitogen
.
core
=
sys
.
modules
[
'__main__'
]
mitogen
.
core
=
sys
.
modules
[
'__main__'
]
...
...
tests/data/self_contained_program.py
View file @
1f99dcb4
...
@@ -18,5 +18,5 @@ def main():
...
@@ -18,5 +18,5 @@ def main():
broker
.
shutdown
()
broker
.
shutdown
()
broker
.
join
()
broker
.
join
()
if
__name__
==
'__main__'
and
mitogen
.
master
:
if
__name__
==
'__main__'
and
mitogen
.
is_
master
:
main
()
main
()
tests/data/webproject/serve_django_app.py
View file @
1f99dcb4
...
@@ -33,5 +33,5 @@ def main(broker):
...
@@ -33,5 +33,5 @@ def main(broker):
#context.call(mitogen.utils.log_to_file, '/tmp/log')
#context.call(mitogen.utils.log_to_file, '/tmp/log')
context
.
call
(
serve_django_app
,
'webproject.settings'
)
context
.
call
(
serve_django_app
,
'webproject.settings'
)
if
__name__
==
'__main__'
and
mitogen
.
master
:
if
__name__
==
'__main__'
and
mitogen
.
is_
master
:
mitogen
.
utils
.
run_with_broker
(
main
)
mitogen
.
utils
.
run_with_broker
(
main
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment