def registerWorker(self):
        '''Register the worker in the dispatcher.'''
        self.updateSys = True
        self.registerDate = time.time()

        infos = self.fetchSysInfos()

        # Add specific info when registering (initially it was the same info at register and periodic utpdate
        infos["createDate"] = self.createDate
        infos["puliversion"] = settings.VERSION

        dct = json.dumps(infos)
        # FIXME if a command is currently running on this worker, notify the dispatcher
        # if len(self.commands.items()):
        #     dct['commands'] = self.commands.items()
        headers = {}
        headers['content-length'] = len(dct)

        while True:
            try:
                LOGGER.info("Boot process... registering worker")
                url = self.computerName % "/rendernodes/%s/"
                resp = self.requestManager.post(url, dct, headers)
            except RequestManager.RequestError, e:
                if e.status != 409:
                    msg = "Dispatcher (%s:%s) is not reachable. We'll retry..."
                    msg %= (settings.DISPATCHER_ADDRESS, settings.DISPATCHER_PORT)
                    LOGGER.exception(msg)
                else:
                    LOGGER.info("Boot process... worker already registered")
                    break
            else:
                if resp == 'ERROR':
                    LOGGER.warning('Worker registration failed.')
                else:
                    LOGGER.info("Boot process... worker registered")
                    break
            # try to register to dispatcher every 10 seconds
            time.sleep(config.WORKER_REGISTER_DELAY_AFTER_FAILURE)

        # once the worker is registered, ensure the RN status is correct according to the killfile presence
        if os.path.isfile(settings.KILLFILE):
            self.pauseWorker(True, False)
        else:
            self.pauseWorker(False, False)

        self.sendSysInfosMessage()
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/octopus/worker/worker.py/Worker.registerWorker/swapped operands of `%`