def __readConf(self): """ read configurations """ # Getting all the possible servers res = getFTS3ServerDict() if not res['OK']: gLogger.error(res['Message']) return res srvDict = res['Value'] serverPolicyType = opHelper().getValue('DataManagement/FTSPlacement/FTS3/ServerPolicy', 'Random') self._serverPolicy = FTS3Utilities.FTS3ServerPolicy(srvDict, serverPolicy=serverPolicyType) self.maxNumberOfThreads = self.am_getOption("MaxThreads", 10) # Number of Operation we treat in one loop self.operationBulkSize = self.am_getOption("OperationBulkSize", 20) # Number of Jobs we treat in one loop self.jobBulkSize = self.am_getOption("JobBulkSize", 20) self.maxFilesPerJob = self.am_getOption("MaxFilesPerJob", 100) self.maxAttemptsPerFile = self.am_getOption("MaxAttemptsPerFile", 256) self.kickDelay = self.am_getOption("KickAssignedHours", 1) self.maxKick = self.am_getOption("KickLimitPerCycle", 100) self.deleteDelay = self.am_getOption("DeleteGraceDays", 180) self.maxDelete = self.am_getOption("DeleteLimitPerCycle", 100) return S_OK()
def __readConf(self): """Read configurations :return: S_OK()/S_ERROR() """ # Getting all the possible servers res = getFTS3ServerDict() if not res["OK"]: gLogger.error(res["Message"]) return res srvDict = res["Value"] serverPolicyType = opHelper().getValue("DataManagement/FTSPlacement/FTS3/ServerPolicy", "Random") self._serverPolicy = FTS3Utilities.FTS3ServerPolicy(srvDict, serverPolicy=serverPolicyType) self.maxNumberOfThreads = self.am_getOption("MaxThreads", 10) # Number of Operation we treat in one loop self.operationBulkSize = self.am_getOption("OperationBulkSize", 20) # Number of Jobs we treat in one loop self.jobBulkSize = self.am_getOption("JobBulkSize", 20) self.maxFilesPerJob = self.am_getOption("MaxFilesPerJob", 100) self.maxAttemptsPerFile = self.am_getOption("MaxAttemptsPerFile", 256) self.kickDelay = self.am_getOption("KickAssignedHours", 1) self.maxKick = self.am_getOption("KickLimitPerCycle", 100) self.deleteDelay = self.am_getOption("DeleteGraceDays", 180) self.maxDelete = self.am_getOption("DeleteLimitPerCycle", 100) # lifetime of the proxy we download to delegate to FTS self.proxyLifetime = self.am_getOption("ProxyLifetime", PROXY_LIFETIME) return S_OK()