Example #1
0
def getSiteInfoFromGlobalQueue(serviceURL):

    url, dbName = splitCouchServiceURL(serviceURL)
    globalQ = WorkQueue(url, dbName)
    try:
        queues = globalQ.getChildQueues()
    except Exception, ex:
        errorInfo = {}
        errorInfo['site_name'] = serviceURL
        return [errorInfo]
Example #2
0
def getSiteInfoFromLocalQueue(serviceURL):
    """ get agent status from local agent """

    url, dbName = splitCouchServiceURL(serviceURL)
    wqService = WorkQueue(url, dbName)
    try:
        wmbsUrls = wqService.getWMBSUrl()
    except Exception, ex:
        errorInfo = {}
        errorInfo['site_name'] = serviceURL
        return [errorInfo]
Example #3
0
def getRequestInfoFromLocalQueue(serviceURL):
    """ get the request info from local queue """

    url, dbName = splitCouchServiceURL(serviceURL)
    service = WorkQueue(url, dbName)
    try:
        wmbsUrls = service.getWMBSUrl()
        jobStatusInfo = service.getJobInjectStatusByRequest()
    except Exception, ex:
        logging.error("%s: %s"(serviceURL, str(ex)))
        return DFormatter.errorFormatter(serviceURL, "LocalQueue Down")
Example #4
0
def getAgentInfoFromGlobalQueue(serviceURL):

    url, dbName = splitCouchServiceURL(serviceURL)
    globalQ = WorkQueue(url, dbName)
    try:
        childQueues = globalQ.getChildQueues()
    except Exception, ex:
        errorInfo = {}
        errorInfo['url'] = serviceURL
        errorInfo['status'] = "Global Queue down: %s" % serviceURL
        errorInfo['acdc'] = 'N/A'
        return [errorInfo]
Example #5
0
def getAgentInfoFromLocalQueue(serviceURL):
    """ get agent status from local agent """
    url, dbName = splitCouchServiceURL(serviceURL)
    localQ = WorkQueue(url, dbName)

    try:
        wmbsUrl = localQ.getWMBSUrl()
    except Exception, ex:
        errorInfo = {}
        errorInfo['url'] = serviceURL
        errorInfo['status'] = "Local Queue down: %s" % serviceURL
        errorInfo['acdc'] = 'N/A'
        return errorInfo
Example #6
0
def getRequestInfoFromGlobalQueue(serviceURL):
    """ get the request info from global queue """
    url, dbName = splitCouchServiceURL(serviceURL)
    service = WorkQueue(url, dbName)
    try:
        jobInfo = service.getTopLevelJobsByRequest()
        qInfo = service.getChildQueuesByRequest()
        siteWhitelists = service.getSiteWhitelistByRequest()
        childQueueURLs = set()
        for item in qInfo:
            childQueueURLs.add(item["local_queue"])

    except Exception, ex:
        logging.error("%s: %s"(serviceURL, str(ex)))
        return DFormatter.errorFormatter(serviceURL, "GlobalQueue Down")