Skip to content

Commit 5e71c41

Browse files
committed
Increase sync intervals
Tinybase saves every deleted item forever, and writes every item to storage on every DO instantiation, leading to millions of total writes every month for stale data... Gotta sync less often until there's a solution for this
1 parent 86c4f51 commit 5e71c41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/server/src/worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
import type { Env } from "./Env"
99
import { GoogleKeepBot } from "./google-keep-bot"
1010

11-
const SHORT_SYNC_INTERVAL = 1000 * 10 // Every 10 seconds
12-
const LONG_SYNC_INTERVAL = 1000 * 60 * 3 // Every 3 minutes
11+
const SHORT_SYNC_INTERVAL = 1000 * 30 // Every 30 seconds
12+
const LONG_SYNC_INTERVAL = 1000 * 60 * 30 // Every 30 minutes
1313

1414
export class TinyDO extends WsServerDurableObject<Env> {
1515
tinybaseStore = createMergeableStore()

0 commit comments

Comments
 (0)