Reduce Supabase disk IO

This commit is contained in:
2569718930@qq.com
2026-05-29 17:22:33 +08:00
parent 9e3a4e2f45
commit 2269aaefd7
63 changed files with 4637 additions and 410 deletions
+1
View File
@@ -457,6 +457,7 @@ class BasicCommandHandler:
for row in rows:
if self._subscription_row_is_paid(row):
return True
return False
if hasattr(self.entitlement_service, "get_latest_active_subscription"):
row = self.entitlement_service.get_latest_active_subscription(
supabase_user_id,
+1 -1
View File
@@ -169,7 +169,7 @@ def _grant_bonus_subscription_days(
}
ins = requests.post(
f"{base}/rest/v1/subscriptions",
headers={**headers, "Prefer": "return=representation"},
headers={**headers, "Prefer": "return=minimal"},
json=create_payload,
timeout=timeout_sec,
)