Package Ganga :: Package Lib :: Package MonitoringServices :: Package MSGMS :: Module MSGUtil
[hide private]
[frames] | no frames]

Module MSGUtil

source code

Utilities for using MSG within Ganga.

N.B. Take care to minimise dependencies on external packages since this module will very likely be copied to the sandbox on the worker node.

Functions [hide private]
 
getSandboxModules()
Return the list of sandbox modules required for MSG monitoring services.
source code
 
createPublisher(server, port, user='', password='', idle_timeout=IDLE_TIMEOUT, exit_timeout=EXIT_TIMEOUT)
Create a new publisher thread which extends GangaThread where available (i.e.
source code
Variables [hide private]
  config = Config.getConfig('Logging')
Function Details [hide private]

createPublisher(server, port, user='', password='', idle_timeout=IDLE_TIMEOUT, exit_timeout=EXIT_TIMEOUT)

source code 
Create a new publisher thread which extends GangaThread where available
(i.e. on the client) or Thread otherwise (i.e. on the worker node).

N.B. If GangaThread is not available then an exit handler is added, with the
given timeout.

@param server: The server host name.
@param user: The user name.
@param password: The password.
@param logger: The logger instance.
@param idle_timeout: Maximum seconds to idle before closing connection.
        Negative value indicates never close connection.
@param exit_timeout: Maximum seconds to clear message queue on exit.
        Negative value indicates clear queue without timeout.

Usage::
    from Ganga.Lib.MonitoringServices.MSG import MSGUtil
    p = MSGUTIL.createPublisher('ganga.msg.cern.ch', 6163)
    p.start()
    p.send('/topic/ganga.dashboard.test', 'Hello World!')
    
See also stomputil.publisher