Exemplo n.º 1
0
	def __init__(self, config, name, task, submodules = []):
		Monitoring.__init__(self, config, name, task)
		self.source_jid = config.get('source jid')
		self.target_jid = config.get('target jid')
		pwPath = config.getPath('source password file')
		os.chmod(pwPath, stat.S_IRUSR)
		# password in variable name removes it from debug log!
		self.source_password = open(pwPath).read().strip()
Exemplo n.º 2
0
	def __init__(self, config, name, task):
		Monitoring.__init__(self, config, name, task)
		jobDesc = task.getDescription(None) # TODO: use the other variables for monitoring
		self.app = config.get('application', 'shellscript', onChange = None)
		jobType = utils.QM(jobDesc.jobType, jobDesc.jobType, 'analysis')
		self.tasktype = config.get('task', jobType, onChange = None)
		self.taskname = config.get('task name', '@GC_TASK_ID@_@DATASETNICK@', onChange = None)
		self._statusMap = {Job.DONE: 'DONE', Job.FAILED: 'DONE', Job.SUCCESS: 'DONE',
			Job.RUNNING: 'RUNNING', Job.ABORTED: 'ABORTED', Job.CANCELLED: 'CANCELLED'}
Exemplo n.º 3
0
	def __init__(self, config, name, task):
		Monitoring.__init__(self, config, name, task)
		jobDesc = task.getDescription(None) # TODO: use the other variables for monitoring
		self._app = config.get('application', 'shellscript', onChange = None)
		self._runningMax = config.getTime('dashboard timeout', 5, onChange = None)
		self._tasktype = config.get('task', jobDesc.jobType or 'analysis', onChange = None)
		self._taskname = config.get('task name', '@GC_TASK_ID@_@DATASETNICK@', onChange = None)
		self._statusMap = {Job.DONE: 'DONE', Job.FAILED: 'DONE', Job.SUCCESS: 'DONE',
			Job.RUNNING: 'RUNNING', Job.ABORTED: 'ABORTED', Job.CANCELLED: 'CANCELLED'}
		self._tp = GCThreadPool()
Exemplo n.º 4
0
 def getTaskConfig(self):
     result = {
         'TASK_NAME': self._taskname,
         'DB_EXEC': self._app,
         'DATASETNICK': ''
     }
     result.update(Monitoring.getTaskConfig(self))
     return result
 def __init__(self, config, name, task):
     Monitoring.__init__(self, config, name, task)
     jobDesc = task.getDescription(
         None)  # TODO: use the other variables for monitoring
     self._app = config.get('application', 'shellscript', onChange=None)
     self._tasktype = config.get('task',
                                 jobDesc.jobType or 'analysis',
                                 onChange=None)
     self._taskname = config.get('task name',
                                 '@GC_TASK_ID@_@DATASETNICK@',
                                 onChange=None)
     self._statusMap = {
         Job.DONE: 'DONE',
         Job.FAILED: 'DONE',
         Job.SUCCESS: 'DONE',
         Job.RUNNING: 'RUNNING',
         Job.ABORTED: 'ABORTED',
         Job.CANCELLED: 'CANCELLED'
     }
     self._tp = GCThreadPool()
Exemplo n.º 6
0
 def __init__(self, config, name, task):
     Monitoring.__init__(self, config, name, task)
     self._source_jid = config.get('source jid', onChange=None)
     self._target_jid = config.get('target jid', onChange=None)
     pwPath = config.getPath('source password file')
     os.chmod(pwPath, stat.S_IRUSR)
     # password in variable name removes it from debug log!
     self._source_password = open(pwPath).read().strip()
     try:  # xmpp contains many deprecated constructs
         import warnings
         warnings.simplefilter('ignore', DeprecationWarning)
     except Exception:
         pass
     self._xmpp = None
     try:
         import xmpp
         self._xmpp = xmpp
     except Exception:
         try:
             import grid_control_gui.xmpp
             self._xmpp = grid_control_gui.xmpp
         except Exception:
             raise Exception('Unable to load jabber library!')
Exemplo n.º 7
0
	def __init__(self, config, name, task):
		Monitoring.__init__(self, config, name, task)
		self._source_jid = config.get('source jid', onChange = None)
		self._target_jid = config.get('target jid', onChange = None)
		pwPath = config.getPath('source password file')
		os.chmod(pwPath, stat.S_IRUSR)
		# password in variable name removes it from debug log!
		self._source_password = open(pwPath).read().strip()
		try: # xmpp contains many deprecated constructs
			import warnings
			warnings.simplefilter('ignore', DeprecationWarning)
		except Exception:
			pass
		self._xmpp = None
		try:
			import xmpp
			self._xmpp = xmpp
		except Exception:
			try:
				import grid_control_gui.xmpp
				self._xmpp = grid_control_gui.xmpp
			except Exception:
				raise Exception('Unable to load jabber library!')
Exemplo n.º 8
0
	def getTaskConfig(self):
		result = {'TASK_NAME': self._taskname, 'DB_EXEC': self._app, 'DATASETNICK': ''}
		result.update(Monitoring.getTaskConfig(self))
		return result