LoginSignup
0
0

【Deno KV】delete all entries purge【TRUNCATE】TypeError: KV storage quota is exhausted.【Deno Deploy】

Last updated at Posted at 2024-02-28
const kv = await Deno.openKv();

Deno.cron("delete all entries", "* * * * *", async () => {
    console.log(new Date())
    const start = Date.now()
    const entries = kv.list({ prefix: [] });
    for await (const entry of entries) {
        kv.delete(entry.key);
    }
    console.log((Date.now() - start) / 1000)
});

全消しするのに結構時間かかります。進捗はダッシュボードをリロードしましょう

image.png

Deno Deployで怒られた

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0