(taskid)
return jsonize({
        "success": True,
        "status": status,
        "returncode": DataStore.tasks[taskid].engine_get_returncode()
    })
Returns status of a scan
Returns status of a scan
Returns status of a scan
def scan_status(taskid):
    """
    Returns status of a scan
    """
    if taskid not in DataStore.tasks:
        logger.warning("[%s] Invalid task ID provided to scan_status()" % taskid)
        return jsonize({"success": False, "message": "Invalid task ID"})

    if DataStore.tasks[taskid].engine_process() is None:
        status = "not running"
    else:
        status = "terminated" if DataStore.tasks[taskid].engine_has_terminated() is True else "running"

    logger.debug("[%s] Retrieved scan status" % taskid)
    return jsonize({
        "success": True,
        "status": status,
        "returncode": DataStore.tasks[taskid].engine_get_returncode()
    })
def scan_status ( taskid ) : if taskid not in DataStore . tasks : logger . warning ( "[%s] Invalid task ID provided to scan_status()" % taskid ) return jsonize ( { "success" : False , "message" : "Invalid task ID" } ) if DataStore . tasks [ taskid ] . engine_process ( ) is None : status = "not running" else : status = "terminated" if DataStore . tasks [ taskid ] . engine_has_terminated ( ) is True else "running" logger . debug ( "[%s] Retrieved scan status" % taskid ) return jsonize ( { "success" : True , "status" : status , "returncode" : DataStore . tasks [ taskid ] . engine_get_returncode ( ) } )