From 4f85cd81de8bca3f333b0034412e6f6619e80382 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 27 Feb 2024 18:03:47 +0700 Subject: [PATCH] FIX: OUTside by mask --- worker-dev/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker-dev/app.py b/worker-dev/app.py index 7f3652e..46e97b8 100644 --- a/worker-dev/app.py +++ b/worker-dev/app.py @@ -97,12 +97,12 @@ def main(): res["status"] = "RECALL_FALSE" - t = coll.update_one({ - "client": res["client"], + t = coll.update_many({ + "client": {'$regex': res["client"]}, "status": {'$in': ["NOT_ANSWERED", "RECALL_FALSE"]} }, {'$set': res, '$inc': {"count_try": 1}}) - coll.update_many({"count_try": {"$gt": 2}}, {"$set": {"status": "DELETED"}}) + coll.update_many({"count_try": {"$gt": 2}, "client": res["client"]}, {"$set": {"status": "DELETED"}}) # ------------------------------- res.clear()