You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8352add
Browse filesBrowse the repository at this point in the historyBrowse files
WHEN ${SubscriptionTable.timeFixedUpdated} >= ${week.end} THEN ${SubscriptionTable.fixedUsage}
1160
1163
WHEN ${SubscriptionTable.timeFixedUpdated} >= ${week.start} THEN ${SubscriptionTable.fixedUsage} + ${cost}
1161
1164
ELSE ${cost}
1162
1165
END
1163
1166
`,
1164
-
timeFixedUpdated: sql`now()`,
1167
+
timeFixedUpdated: sql`
1168
+
CASE
1169
+
WHEN ${SubscriptionTable.timeFixedUpdated} > ${trackedAt} THEN ${SubscriptionTable.timeFixedUpdated}
1170
+
ELSE ${trackedAt}
1171
+
END
1172
+
`,
1165
1173
rollingUsage: sql`
1166
1174
CASE
1167
1175
WHEN UNIX_TIMESTAMP(${SubscriptionTable.timeRollingUpdated}) >= UNIX_TIMESTAMP(now()) - ${rollingWindowSeconds} THEN ${SubscriptionTable.rollingUsage} + ${cost}
@@ -1185,8 +1193,8 @@ export async function handler(
0 commit comments