Exemplo n.º 1
0
    def __init__(self,name=None,auto_register=True):


        print "Initializing Manager"
        self.basedir = '.'
        BaseThread.__init__(self,name=name)
        SimpleApplicationManager.__init__(self)
Exemplo n.º 2
0
    def __init__(self,program,peer,ds_enabled,labels):
        BaseThread.__init__(self,name='WorkerAgent')
        from diane.util.compatibility import uuid
        self.uuid = str(uuid())
        self.program = program
        self.ds_enabled = ds_enabled
        if ds_enabled:
            self.ds = peer
            self.master = None
        else:
            self.ds = None
            self.master = peer
        self.labels = labels
        self.heartbeat_thread = None
        self.wid = None
        self.application = None
        self.finalization_cookie = None
        self.ftc = None #file transfer client connected to the default file transfer server
        
        # if this worker is run as a Ganga job (optional) then retrive the Ganga Job UUID to make it available
        # in monitoring/vcards etc...

        self.ganga_job_uuid =  os.environ.get('GANGA_JOB_UUID', '')

        if not self.ganga_job_uuid:
            try:
                self.ganga_job_uuid = open('ganga_job_uuid', 'r').read() 
            except IOError:
                pass 
Exemplo n.º 3
0
 def __init__(self, job_master, appmgr):
     BaseThread.__init__(self, name=self.__class__.__name__)
     ## RunMaster instance.
     self.job_master = job_master
     ## Application manager.
     self.appmgr = appmgr
     if self.appmgr:
         self.appmgr.scheduler = self
Exemplo n.º 4
0
 def __init__(self,name=None,auto_register=True):
     self.basedir="."
     BaseThread.__init__(self,name=name)
     SimpleApplicationManager.__init__(self)
Exemplo n.º 5
0
 def __init__(self,master):
     BaseThread.__init__(self,'ControlThread')
     self.master = master
     self.processing = False
Exemplo n.º 6
0
 def __init__(self,worker_agent,peer):
     BaseThread.__init__(self,name='HeartbeatThread')
     self.worker_agent = worker_agent
     self.peer = peer
Exemplo n.º 7
0
 def stop(self):
     BaseThread.stop(self)
     if self.heartbeat_thread:
         self.heartbeat_thread.stop()
     self.program.stop()