Переглянути джерело

Strip trailing whitespace

Mike Naberezny 10 роки тому
батько
коміт
c8e16f420e
1 змінених файлів з 13 додано та 13 видалено
  1. 13 13
      docs/events.rst

+ 13 - 13
docs/events.rst

@@ -47,7 +47,7 @@ listeners in Python slightly easier than in other languages.
 
 
 Configuring an Event Listener
 Configuring an Event Listener
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    
+
 A supervisor event listener is specified via a ``[eventlistener:x]``
 A supervisor event listener is specified via a ``[eventlistener:x]``
 section in the configuration file.  Supervisor ``[eventlistener:x]``
 section in the configuration file.  Supervisor ``[eventlistener:x]``
 sections are treated almost exactly like supervisor ``[program:x]``
 sections are treated almost exactly like supervisor ``[program:x]``
@@ -63,7 +63,7 @@ sections that can be placed into the configuration file.
 When an ``[eventlistener:x]`` section is defined, it actually defines
 When an ``[eventlistener:x]`` section is defined, it actually defines
 a "pool", where the number of event listeners in the pool is
 a "pool", where the number of event listeners in the pool is
 determined by the ``numprocs`` value within the section.
 determined by the ``numprocs`` value within the section.
-    
+
 The ``events`` parameter of the ``[eventlistener:x]`` section
 The ``events`` parameter of the ``[eventlistener:x]`` section
 specifies the events that will be sent to a listener pool.  A
 specifies the events that will be sent to a listener pool.  A
 well-written event listener will ignore events that it cannot process,
 well-written event listener will ignore events that it cannot process,
@@ -104,7 +104,7 @@ pools which are subscribed to receive events for the event's type
 (filtered by the ``events`` value in the eventlistener
 (filtered by the ``events`` value in the eventlistener
 section) will be found.  One of the listeners in each listener pool
 section) will be found.  One of the listeners in each listener pool
 will receive the event notification (any "available" listener).
 will receive the event notification (any "available" listener).
-    
+
 Every process in an event listener pool is treated equally by
 Every process in an event listener pool is treated equally by
 supervisor.  If a process in the pool is unavailable (because it is
 supervisor.  If a process in the pool is unavailable (because it is
 already processing an event, because it has crashed, or because it has
 already processing an event, because it has crashed, or because it has
@@ -130,7 +130,7 @@ away the oldest event in the buffer and log an error.
 
 
 Writing an Event Listener
 Writing an Event Listener
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~
-  
+
 An event listener implementation is a program that is willing to
 An event listener implementation is a program that is willing to
 accept structured input on its stdin stream and produce structured
 accept structured input on its stdin stream and produce structured
 output on its stdout stream.  An event listener implementation should
 output on its stdout stream.  An event listener implementation should
@@ -169,17 +169,17 @@ server      The identifier of the supervisord sending the
 serial      An integer assigned to each event.  No two      30
 serial      An integer assigned to each event.  No two      30
             events generated during the lifetime of
             events generated during the lifetime of
             a :program:`supervisord` process will have
             a :program:`supervisord` process will have
-            the same serial number.  The value is useful 
+            the same serial number.  The value is useful
             for functional testing and detecting event
             for functional testing and detecting event
             ordering anomalies.
             ordering anomalies.
 pool        The name of the event listener pool which       myeventpool
 pool        The name of the event listener pool which       myeventpool
             generated this event.
             generated this event.
 pooolserial An integer assigned to each event by the        30
 pooolserial An integer assigned to each event by the        30
             eventlistener pool which it is being sent
             eventlistener pool which it is being sent
-            from.  No two events generated by the same 
+            from.  No two events generated by the same
             eventlister pool during the lifetime of a
             eventlister pool during the lifetime of a
             :program:`supervisord` process will have the
             :program:`supervisord` process will have the
-            same ``poolserial`` number.  This value can 
+            same ``poolserial`` number.  This value can
             be used to detect event ordering anomalies.
             be used to detect event ordering anomalies.
 eventname   The specific event type name (see               TICK_5
 eventname   The specific event type name (see               TICK_5
             :ref:`event_types`)
             :ref:`event_types`)
@@ -190,7 +190,7 @@ len         An integer indicating the number of bytes in    22
 An example of a complete header line is as follows.
 An example of a complete header line is as follows.
 
 
 .. code-block:: text
 .. code-block:: text
-        
+
    ver:3.0 server:supervisor serial:21 pool:listener poolserial:10 eventname:PROCESS_COMMUNICATION_STDOUT len:54
    ver:3.0 server:supervisor serial:21 pool:listener poolserial:10 eventname:PROCESS_COMMUNICATION_STDOUT len:54
 
 
 Directly following the linefeed character in the header is the event
 Directly following the linefeed character in the header is the event
@@ -305,7 +305,7 @@ stderr, and responds with an ``OK`` result, and then subsequently a
    def main():
    def main():
        while 1:
        while 1:
            write_stdout('READY\n') # transition from ACKNOWLEDGED to READY
            write_stdout('READY\n') # transition from ACKNOWLEDGED to READY
-           line = sys.stdin.readline()  # read header line from stdin 
+           line = sys.stdin.readline()  # read header line from stdin
            write_stderr(line) # print it out to stderr
            write_stderr(line) # print it out to stderr
            headers = dict([ x.split(':') for x in line.split() ])
            headers = dict([ x.split(':') for x in line.split() ])
            data = sys.stdin.read(int(headers['len'])) # read the event payload
            data = sys.stdin.read(int(headers['len'])) # read the event payload
@@ -373,7 +373,7 @@ with space-separated tokens.  Each token represents a key-value pair.
 The key and value are separated by a colon.  For example:
 The key and value are separated by a colon.  For example:
 
 
 .. code-block:: text
 .. code-block:: text
-    
+
    processname:cat groupname:cat from_state:STOPPED
    processname:cat groupname:cat from_state:STOPPED
 
 
 Token sets do not have a linefeed or carriage return character at
 Token sets do not have a linefeed or carriage return character at
@@ -424,7 +424,7 @@ include additional key/value pairs in the token set.
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 
 
-Indicates a process has moved from a state to the STARTING state.  
+Indicates a process has moved from a state to the STARTING state.
 
 
 *Name*: ``PROCESS_STATE_STARTING``
 *Name*: ``PROCESS_STATE_STARTING``
 
 
@@ -864,7 +864,7 @@ receive event notifications of all the subtypes of
 ``PROCESS_GROUP_ADDED`` Event Type
 ``PROCESS_GROUP_ADDED`` Event Type
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
-Indicates that a process group has been added to Supervisor's configuration. 
+Indicates that a process group has been added to Supervisor's configuration.
 
 
 *Name*: ``PROCESS_GROUP_ADDED``
 *Name*: ``PROCESS_GROUP_ADDED``
 
 
@@ -879,7 +879,7 @@ Indicates that a process group has been added to Supervisor's configuration.
 ``PROCESS_GROUP_REMOVED`` Event Type
 ``PROCESS_GROUP_REMOVED`` Event Type
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
-Indicates that a process group has been removed from Supervisor's configuration. 
+Indicates that a process group has been removed from Supervisor's configuration.
 
 
 *Name*: ``PROCESS_GROUP_REMOVED``
 *Name*: ``PROCESS_GROUP_REMOVED``