From ce62e5148df42a77fc1578779c08249f667dcd0f Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Tue, 6 Feb 2024 02:08:32 +0800 Subject: [PATCH] fix --- cronjob/media/compress.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cronjob/media/compress.py b/cronjob/media/compress.py index 986b7ba..e743d5f 100644 --- a/cronjob/media/compress.py +++ b/cronjob/media/compress.py @@ -116,16 +116,22 @@ class S: return uo def get_wait_deal_images(self): - images = [ - { - "src_id": "imgprod/b2/6b/a437-a601-4711-ae60-60a972b57574", - "fmt": "image/png" - } - ] + q = { + "status": {"$ne": 100} + } + images = list() + images_tmp = self.col_image.find(q) + for img in images_tmp: + fmt = safe_get_str(img, "fmt") + if fmt.find("heic"): + continue + images.append(img) return images def proc(self): images = self.get_wait_deal_images() + print(len(images)) + return idx = 0 for image in images: idx += 1