コード例 #1
0
    def __init__(self,rid,server):
        Peer.__init__(self,server,logger)
        
        ## CORBAProgram server object which contains this service.
        self.server = server
        
        ## WorkerRegistry.
        self.worker_registry = WorkerRegistry()
        
        self.__ping_cnt = 0
        
        ## TaskScheduler.
        self.task_scheduler = None

        ## ControlThread,
        self.control_thread = ControlThread(self)

        ## cache for lookup efficiency
        ##self.free_workers = {}
        ##self.received_workers = {}

        # application bootstrap parameters
        self.app_boot_data = None

        self.file_server = None # default file server

        # numeric run identifier
        self.rid = rid

        # uuid
        from diane.util.compatibility import uuid
        self.uuid = str(uuid())
       
        # journal has an option to report events via MSG and uuid is used to identify the master
        self.journal = diane.journal.Journal('master.j', self.uuid)

        # automatically generated task id
        self.__tid = 1