|
@@ -638,31 +638,6 @@ def run_cycle(
|
|
|
)
|
|
)
|
|
|
return payload
|
|
return payload
|
|
|
|
|
|
|
|
- if apply and not bool(daily_state.get("morning_recovery_done")):
|
|
|
|
|
- execution = execute_inventory_action(
|
|
|
|
|
- run_id=run_id,
|
|
|
|
|
- now=now,
|
|
|
|
|
- decision=DECISION_RESTORE,
|
|
|
|
|
- observed_partition=None,
|
|
|
|
|
- observed_cpm=None,
|
|
|
|
|
- apply=True,
|
|
|
|
|
- accounts=accounts,
|
|
|
|
|
- config=config,
|
|
|
|
|
- tencent=TencentClient(),
|
|
|
|
|
- test_notification=test_notification,
|
|
|
|
|
- )
|
|
|
|
|
- payload["decision"] = "MORNING_RECOVERY"
|
|
|
|
|
- payload["summary"] = execution
|
|
|
|
|
- if not execution["failures"]:
|
|
|
|
|
- save_daily_state(
|
|
|
|
|
- now.date(),
|
|
|
|
|
- morning_recovery_done=True,
|
|
|
|
|
- last_inventory_refresh_at=now,
|
|
|
|
|
- last_evaluated_at=now,
|
|
|
|
|
- )
|
|
|
|
|
- else:
|
|
|
|
|
- return payload
|
|
|
|
|
-
|
|
|
|
|
if cpm_override is not None:
|
|
if cpm_override is not None:
|
|
|
signal = HourlyCpm(
|
|
signal = HourlyCpm(
|
|
|
partition=f"{now.strftime('%Y%m%d%H')}_override",
|
|
partition=f"{now.strftime('%Y%m%d%H')}_override",
|