[Supervisor-checkins] r794 - supervisor_manual/trunk/chapters

Mike Naberezny mike at maintainable.com
Mon Aug 11 00:18:38 EDT 2008


Author: Mike Naberezny <mike at maintainable.com>
Date: Mon Aug 11 00:18:37 2008
New Revision: 794

Log:
Document supervisor.startAllProcesses() and supervisor.startProcessGroup().

Modified:
   supervisor_manual/trunk/chapters/api-process-control.xml

Modified: supervisor_manual/trunk/chapters/api-process-control.xml
==============================================================================
--- supervisor_manual/trunk/chapters/api-process-control.xml	(original)
+++ supervisor_manual/trunk/chapters/api-process-control.xml	Mon Aug 11 00:18:37 2008
@@ -228,6 +228,173 @@
     </para>
   </sect2>
 
+  <sect2 id="api.process-control.supervisor-startAllProcesses">
+    <title>supervisor.startAllProcesses()</title>
+
+    <para>
+      <programlisting><![CDATA[
+supervisor.startAllProcesses()
+]]></programlisting>
+    </para>
+    
+    <table>
+      <title>supervisor.startAllProcesses() Parameters</title>
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Type</entry>
+            <entry>Name</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>boolean</entry>
+            <entry>wait</entry>
+            <entry>
+              Wait for start to complete before returning? (optional, default True)
+            </entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+
+    <table>
+      <title>supervisor.startAllProcesses() Return Value</title>
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Type</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+          <tbody>
+            <row>
+              <entry>boolean or array&lt;struct&gt;</entry>
+              <entry>See below</entry>                    
+            </row>
+          </tbody>
+      </tgroup>
+    </table>      
+    
+    <para>
+      This method will start all processes that are not running. It
+      is the equivalent of calling <code>supervisor.startProcess()</code> on
+      every process that is not running. 
+    </para>
+
+    <para>
+      If <code>wait=False</code>, the method will return immediately without
+      waiting for Supervisor to start any of the processes in the group.  The
+      return value will always be boolean True.
+    </para>
+    
+    <para>
+      If <code>wait=True</code>, Supervisor will attempt to start every process
+      in the group.  It will then hold the HTTP request until each process
+      has reached startsecs.
+    </para>
+    
+    <para>
+      The return value will then be an array of structs, where each struct
+      contains the keys <code>group</code> (group name), <code>name</code>
+      (process name), <code>description</code> (process description), and
+      <code>status</code> (fault code).
+    </para>
+    
+    <para>
+      If a process starts successfully, the <code>status</code> will be set
+      to <code>SUCCESS</code>.  Otherwise, the fault <code>ABNORMAL_TERMINATION</code>
+      is raised.
+    </para>
+  </sect2>
+
+  <sect2 id="api.status-control.supervisor-startprocessgroup">
+    <title>supervisor.startProcessGroup()</title>
+
+    <para>
+      <programlisting><![CDATA[
+supervisor.startProcessGroup(name, wait=True)
+]]></programlisting>
+    </para>
+
+    <table>
+      <title>supervisor.startProcessGroup() Parameters</title>
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Type</entry>
+            <entry>Name</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>string</entry>
+            <entry>name</entry>
+            <entry>Name of the group</entry>
+          </row>
+          <row>
+            <entry>boolean</entry>
+            <entry>wait</entry>
+            <entry>
+              Wait for start to complete before returning? (optional, default True)
+            </entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
+
+    <table>
+      <title>supervisor.startProcessGroup() Return Value</title>
+      <tgroup cols="2">
+        <thead>
+          <row>
+            <entry>Type</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+          <tbody>
+            <row>
+              <entry>boolean or array&lt;struct&gt;</entry>
+              <entry>See below</entry>                    
+            </row>
+          </tbody>
+      </tgroup>
+    </table>      
+
+    <para> 
+      The <code>supervisor.startProcessGroup()</code> method will start all
+      processes in a group. If name of the group (<code>name</code> argument)
+      is not recognized, the fault <code>BAD_NAME</code> will be raised.
+    </para>
+    
+    <para>
+      If <code>wait=False</code>, the method will return immediately without
+      waiting for Supervisor to start any of the processes in the group.  The
+      return value will always be boolean True.
+    </para>
+    
+    <para>
+      If <code>wait=True</code>, Supervisor will attempt to start every process
+      in the group.  It will then hold the HTTP request until each process
+      has reached startsecs.
+    </para>
+    
+    <para>
+      The return value will then be an array of structs, where each struct
+      contains the keys <code>group</code> (group name), <code>name</code>
+      (process name), <code>description</code> (process description), and
+      <code>status</code> (fault code).
+    </para>
+    
+    <para>
+      If a process starts successfully, the <code>status</code> will be set
+      to <code>SUCCESS</code>.  Otherwise, the fault <code>ABNORMAL_TERMINATION</code>
+      is raised.
+    </para>
+  </sect2>
+
   <sect2 id="api.process-control.supervisor-stopprocessgroup">
     <title>supervisor.stopProcessGroup()</title>
     
@@ -329,13 +496,6 @@
               Name of the group and process
             </entry>
           </row>
-          <row>
-            <entry>string</entry>
-            <entry>namespec</entry>
-            <entry>
-              Name of the process
-            </entry>
-          </row>
         </tbody>
       </tgroup>
     </table>
@@ -382,7 +542,6 @@
     </para>
   </sect2>
 
-
   <sect2 id="api.process-control.supervisor-stopAllProcesses">
     <title>supervisor.stopAllProcesses()</title>
 
@@ -441,8 +600,7 @@
       This method is asynchronous.  It will return before the processes have
       been killed.  Once each process has been killed, they will be
       removed from Supervisor’s process table.
-    </para>
-    
+    </para>    
   </sect2>
 
   <sect2 id="api.process-control.supervisor-sendProcessStdin">


More information about the Supervisor-checkins mailing list