then list and count all the records on each request to see if they exceed the limit.
then list and count all the records on each request to see if they exceed the limit.
limit. so not very many.put(); you fire and foget them until the next request where you list() and count.expiration prop. But at the end of the day it will be too expensive to use this solution for rate limiting.
WorkerKV and use DurableObjectsKV is not really a good idea here due to it’s eventually consistent nature. You can however make a rate-limit from Durable Objects 272, which some others have already made from too.
npx wrangler pages deploy is erroring for me, Cloudflare having API issues?
wrangler secret put INNGEST_SIGNING_KEY doesn't make it available in the "environment variables", inngest sync fails and to put it in environment variables, I need to add it to wrangler.toml as "plain text" and deploy.wrangler dev --remote is it possible to only specify to run R2 remotely but other service to be run locally?getPlatformProxy() of wrangler?wrangler dev if that's what you're trying to do?wrangler dev is Miniflare under the hood, and runs Workersput()expirationWorkerKVDurableObjectsnpx wrangler pages deploy ✘ [ERROR] Received a malformed response from the API
upstream connect error or disconnect/reset before headers. retried and the latest reset reason: conn... (length = 114)
GET /accounts/***/pages/projects/example -> 503 Service Unavailable✘ [ERROR] More than one account available but unable to select one in non-interactive mode.
Please set the appropriate `account_id` in your `wrangler.toml` file.
Available accounts are (`<name>`: `<account_id>`):wrangler secret put INNGEST_SIGNING_KEYPS D:\others\durable-objects-template> wrangler dev
⛅️ wrangler 3.63.1
-------------------
Your worker has access to the following bindings:
- Durable Objects:
- COUNTER: Counter
⎔ Starting local server...
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [l] turn off local mode, [c] clear console, [x] to exit
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
C:\Users\user\AppData\Roaming\npm\node_modules\wrangler\wrangler-dist\cli.js:29765
throw a;
^
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at #assembleAndUpdateConfig (C:\Users\user\AppData\Roaming\npm\node_modules\wrangler\node_modules\miniflare\dist\src\index.js:9178:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Mutex.runWith (C:\Users\user\AppData\Roaming\npm\node_modules\wrangler\node_modules\miniflare\dist\src\index.js:3521:16) {
code: 'ERR_RUNTIME_FAILURE',
cause: undefined
}
Node.js v20.14.0 ERROR [unhandledRejection] connect ECONNREFUSED 127.0.0.1:63231 8:51:07 AMgetPlatformProxy()[[d1_databases]]
binding = "DB"
database_name = "name"
database_id = "<uuid>"
migrations_dir = "./migrations"
[env.preview]
[[d1_databases]]
binding = "DB"
database_name = "name-preview"
database_id = "<uuid>"
migrations_dir = "./migrations"