fix
This commit is contained in:
parent
33c919fa4a
commit
d2e9ba3e48
|
@ -121,7 +121,7 @@ class S:
|
|||
}
|
||||
images = list()
|
||||
images_tmp = self.col_image.find(q)
|
||||
print(len(images_tmp))
|
||||
logger.Info("len(images_tmp): {}".format(len(images_tmp)))
|
||||
for img in images_tmp:
|
||||
fmt = safe_get_str(img, "fmt")
|
||||
if fmt.find("heic") > 0:
|
||||
|
@ -131,8 +131,7 @@ class S:
|
|||
|
||||
def proc(self):
|
||||
images = self.get_wait_deal_images()
|
||||
print(len(images))
|
||||
return
|
||||
logger.Info("len(images): {}".format(len(images)))
|
||||
idx = 0
|
||||
for image in images:
|
||||
idx += 1
|
||||
|
@ -193,8 +192,14 @@ class S:
|
|||
if not mongo_ret:
|
||||
logger.Error("bulk_write fail, oss_src_id: {}".format(oss_src_id))
|
||||
|
||||
logger.Info("{}, success, oss_src_id: {}, id: {}".format(idx, oss_src_id, safe_get_int(image, "_id")))
|
||||
logger.Info("{}/{}, success, oss_src_id: {}, id: {}".format(idx, len(images), oss_src_id, safe_get_int(image, "_id")))
|
||||
|
||||
def proc_loop(self):
|
||||
while True:
|
||||
logger.Info("loop, {}".format(get_time_str_by_ts(int(time.time()))))
|
||||
self.proc()
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
s = S()
|
||||
s.proc()
|
||||
s.proc_loop()
|
||||
|
|
Loading…
Reference in New Issue