فهرست منبع

fix(realtime-control): execute day pause for open-ended ads

刘立冬 2 روز پیش
والد
کامیت
c48083e1d8

+ 3 - 2
examples/tencent_realtime_control/operator_control.py

@@ -519,8 +519,9 @@ def _execute_pause(
             continue
         if (
             mode == PAUSE_UNTIL_NEXT_DELIVERY
-            and str(ad.get("end_date") or "")
-            and str(ad.get("end_date")) < resume_at.date().isoformat()
+            and not _delivery_end_allows_day(
+                ad.get("end_date"), resume_at.date().isoformat()
+            )
         ):
             _record_item(
                 command,

+ 1 - 0
examples/tencent_realtime_control/test_feishu_natural_commands.py

@@ -280,6 +280,7 @@ class DayPauseExecutionTest(unittest.TestCase):
                 "adgroup_name": "active",
                 "configured_status": "AD_STATUS_NORMAL",
                 "begin_date": "2026-07-01",
+                "end_date": "0",
             }]
 
         def update_ad_begin_dates(self, account_id, adgroup_ids, begin_date):