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