def getUploadM3u8(): workId = request.args.get("workId") instance = UploadWrap() (isFind, m3u8Path) = instance.get_m3u8(workId) if (isFind == False): resultData(False, "找不到任务", None) return resultData(True, "", {"m3u8": m3u8Path})
def startUpload(): m3u8Input = request.args.get("m3u8Input") splitPathInput = request.args.get("splitPathInput") instance = UploadWrap() workId = instance.startWork(m3u8Input, splitPathInput) return resultData(True, "", workId)
def getUploadStatusAndLog(): workId = request.args.get("workId") instance = UploadWrap() (isFind, logs) = instance.get_log(workId) (isFind, status) = instance.get_status(workId) if (isFind == False): resultData(False, "找不到任务", None) return resultData(True, "", {"logs": logs, "status": status})