fix
This commit is contained in:
parent
d2e9ba3e48
commit
bb3ba34f96
|
@ -145,6 +145,8 @@ class S:
|
||||||
|
|
||||||
bulk_reqs = list()
|
bulk_reqs = list()
|
||||||
|
|
||||||
|
status = 100
|
||||||
|
|
||||||
# 先下载到本地,源文件 imgprod/a4/98/22b4-391d-445d-834c-5048fb77653c
|
# 先下载到本地,源文件 imgprod/a4/98/22b4-391d-445d-834c-5048fb77653c
|
||||||
oss_src_download_path = cur_dir + src_id_python_type + ".{}".format(fmt)
|
oss_src_download_path = cur_dir + src_id_python_type + ".{}".format(fmt)
|
||||||
try:
|
try:
|
||||||
|
@ -156,6 +158,7 @@ class S:
|
||||||
# 720P
|
# 720P
|
||||||
uo720 = self.deal_one(oss_src_id, oss_src_download_path, fmt, Resize720P)
|
uo720 = self.deal_one(oss_src_id, oss_src_download_path, fmt, Resize720P)
|
||||||
if not uo720:
|
if not uo720:
|
||||||
|
status = 101
|
||||||
logger.Error("deal_one 720 error, oss_src_id: {}".format(oss_src_id))
|
logger.Error("deal_one 720 error, oss_src_id: {}".format(oss_src_id))
|
||||||
else:
|
else:
|
||||||
bulk_reqs.append(uo720)
|
bulk_reqs.append(uo720)
|
||||||
|
@ -163,6 +166,7 @@ class S:
|
||||||
# 1080P
|
# 1080P
|
||||||
uo1080 = self.deal_one(oss_src_id, oss_src_download_path, fmt, Resize1080P)
|
uo1080 = self.deal_one(oss_src_id, oss_src_download_path, fmt, Resize1080P)
|
||||||
if not uo1080:
|
if not uo1080:
|
||||||
|
status = 101
|
||||||
logger.Error("deal_one 1080 error, oss_src_id: {}".format(oss_src_id))
|
logger.Error("deal_one 1080 error, oss_src_id: {}".format(oss_src_id))
|
||||||
else:
|
else:
|
||||||
bulk_reqs.append(uo1080)
|
bulk_reqs.append(uo1080)
|
||||||
|
@ -170,6 +174,7 @@ class S:
|
||||||
# 1440P
|
# 1440P
|
||||||
uo1440 = self.deal_one(oss_src_id, oss_src_download_path, fmt, Resize1440P)
|
uo1440 = self.deal_one(oss_src_id, oss_src_download_path, fmt, Resize1440P)
|
||||||
if not uo1440:
|
if not uo1440:
|
||||||
|
status = 101
|
||||||
logger.Error("deal_one 1440 error, oss_src_id: {}".format(oss_src_id))
|
logger.Error("deal_one 1440 error, oss_src_id: {}".format(oss_src_id))
|
||||||
else:
|
else:
|
||||||
bulk_reqs.append(uo1440)
|
bulk_reqs.append(uo1440)
|
||||||
|
@ -182,7 +187,7 @@ class S:
|
||||||
"$set": {
|
"$set": {
|
||||||
"size_src": src_size,
|
"size_src": src_size,
|
||||||
"resize_t": int(time.time()),
|
"resize_t": int(time.time()),
|
||||||
"status": 100
|
"status": status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bulk_reqs.append(UpdateOne(q1, up1))
|
bulk_reqs.append(UpdateOne(q1, up1))
|
||||||
|
|
Loading…
Reference in New Issue