|
@@ -359,11 +359,16 @@ Adding/Reloading modules
|
|
|
|
|
|
.. versionadded:: 2.5
|
|
|
|
|
|
-`pool_restart` command sends restart requests to all worker processes.
|
|
|
-It is particularly useful for reloading imported modules or adding new
|
|
|
-ones. `pool_restart` command doesn't interrupt executing tasks.
|
|
|
+The remote control command ``pool_restart`` sends restart requests to
|
|
|
+the workers child processes. It is particularly useful for forcing
|
|
|
+the worker to import new modules, or for reloading already imported
|
|
|
+modules. This command does not interrupt executing tasks.
|
|
|
|
|
|
-The following command adds `foo` and `bar` modules:
|
|
|
+Example
|
|
|
+~~~~~~~
|
|
|
+
|
|
|
+Runnig the following command will result in the `foo` and `bar` modules
|
|
|
+being imported by the worker processes:
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
@@ -388,17 +393,17 @@ reloader as well.
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
-Module reloading has some caveats which are documented in `reload`_.
|
|
|
+Module reloading comes with some caveats that are documented in :fun:`reload`.
|
|
|
Make sure your modules are suitable for reloading.
|
|
|
|
|
|
-.. _`reload`: http://docs.python.org/library/functions.html#reload
|
|
|
-
|
|
|
.. seealso::
|
|
|
|
|
|
http://pyunit.sourceforge.net/notes/reloading.html
|
|
|
|
|
|
http://www.indelible.org/ink/python-reloading/
|
|
|
|
|
|
+http://docs.python.org/library/functions.html#reload
|
|
|
+
|
|
|
.. _worker-custom-control-commands:
|
|
|
|
|
|
Writing your own remote control commands
|