Package Ganga :: Package Core :: Package MonitoringComponent :: Module Local_GangaMC_Service
[hide private]
[frames] | no frames]

Module Local_GangaMC_Service

source code

Classes [hide private]
  JobAction
  MonitoringWorkerThread
  _DictEntry
  UpdateDict
This serves as the Update Table.
  CallbackHookEntry
  JobRegistry_Monitor
Job monitoring service thread.
Functions [hide private]
 
_makeThreadPool(threadPoolSize=THREAD_POOL_SIZE, daemonic=True) source code
 
stop_and_free_thread_pool(fail_cb=None, max_retries=5)
Clean shutdown of the thread pool.
source code
 
_purge_actions_queue()
Purge Qin: consume the current queued actions Note: the producer (i.e JobRegistry_Monitor) should be stopped before the method is called
source code
 
_trace(frame, event, arg) source code
 
getStackTrace() source code
Variables [hide private]
  log = Ganga.Utility.logging.getLogger()
  config = Ganga.Utility.Config.makeConfig('PollThread', 'backgr...
  THREAD_POOL_SIZE = config ['update_thread_pool_size']
  Qin = Queue.Queue()
  ThreadPool = []
  tpFreeThreads = 0
  updateDict_ts = SynchronisedObject(UpdateDict())
Function Details [hide private]

stop_and_free_thread_pool(fail_cb=None, max_retries=5)

source code 

Clean shutdown of the thread pool. 
A failed attempt to stop all the worker threads is followed by a call to the supplied callback which
decides if a new attempt is performed or not.
Example for a decision callback:      
     def myfail_cb():
        resp = raw_input("The cleanup procedures did not complete yet. Do you want to wait more?[y/N]")
        return resp.lower()=='y'


Variables Details [hide private]

config

Value:
Ganga.Utility.Config.makeConfig('PollThread', 'background job status m\
onitoring and output retrieval')