|
@@ -46,12 +46,15 @@ def upload_to_oss(live_id, id):
|
46
|
46
|
# 验证一下
|
47
|
47
|
with open(local_path, 'rb') as file_obj:
|
48
|
48
|
assert bucket.get_object(oss_path).read() == file_obj.read()
|
|
49
|
+
|
49
|
50
|
PrintLog.print(live_id + ' 上传完成')
|
50
|
|
- MysqlLiveReplay().set_task_status(id, '7')
|
51
|
|
- # 删除磁盘上的直播回放文件
|
|
51
|
+
|
52
|
52
|
try:
|
|
53
|
+ MysqlLiveReplay().set_task_status(id, '7')
|
|
54
|
+ # 删除磁盘上的直播回放文件
|
53
|
55
|
os.remove(local_path)
|
54
|
56
|
PrintLog.print(live_id + ' 删除文件成功')
|
|
57
|
+
|
55
|
58
|
except Exception as e:
|
56
|
59
|
PrintLog.print('删除文件抛出异常:' + str(e))
|
57
|
60
|
except Exception as e:
|