Menu

Our daily quota went from 10,000 to 60,000, and only four of the thirteen lines I changed were code
📰

Our daily quota went from 10,000 to 60,000, and only four of the thirteen lines I changed were code

DEV Community: typescript·Daniel Pertu·4 days ago
#4bGD6cSv
#devtotypescript#devto#dev#quota#enter
Reading 0:00
15s threshold

In October I wrote about the three caps that are not the same number : the YouTube Data API's daily quota, the separate bucket search calls draw from, and our own caps a little under both, because a failed request costs quota too.

Last week our allowance went up. The pool went from 10,000 units a day to 60,000, and the search bucket from 100 calls to 1,100. In a well-built system that is a one-line commit.

It was seven files and thirteen lines, and I want to go through them, because the split is the interesting part:

README.md | 2 +- src/app/admin/runs/page.tsx | 2 +- src/db/schema.ts | 2 +- src/lib/limits/counters.ts | 8 ++++---- src/lib/pipeline/run.ts | 2 +- src/lib/youtube/client.ts | 2 +- src/lib/youtube/quota.ts | 8 ++++---- 7 files changed, 13 insertions(+), 13 deletions(-)

Enter fullscreen mode

Exit fullscreen mode

Four of those thirteen lines are numbers the program reads. One is a sentence that stopped being a sentence.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.