Package syspolicy :: Module worker :: Class Worker
[hide private]
[frames] | no frames]

Class Worker

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        Worker

This class is the background worker thread for SysPolicy.

It will implement all the ChangeSets that are enqueued and update their status according to the success or failure.

Instance Methods [hide private]
 
__init__(self, policytool)
Initialize the Worker and it's Queues.
source code
 
run(self)
This is the main function of the Worker class in which any queued ChangeSets are processed.
source code

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  queue = None
the queue of ChangeSets that need processing
  pt = None
reference to the PolicyTool of this Worker
Properties [hide private]

Inherited from threading.Thread: daemon, ident, name

Inherited from object: __class__

Method Details [hide private]

__init__(self, policytool)
(Constructor)

source code 

Initialize the Worker and it's Queues.

Parameters:
  • policytool - The PolicyTool instance in which the Worker belongs
Overrides: object.__init__

run(self)

source code 

This is the main function of the Worker class in which any queued ChangeSets are processed. This function runs in a separate daemon thread in the background.

Overrides: threading.Thread.run