diff --git a/src/worker/_helpers/store.ts b/src/worker/_helpers/store.ts index fda210e..de3f7f1 100644 --- a/src/worker/_helpers/store.ts +++ b/src/worker/_helpers/store.ts @@ -72,16 +72,12 @@ export async function upsertKvStore(value: DataV1 | null, allMonitors: Monitor[] await KV_STORE.delete(DATA_KEY) return } - const cleanedValue = cleanDataV1(value, allMonitors) - // eslint-disable-next-line no-console - console.log('🚀 ~ file: store.ts:76 ~ upsertKvStore ~ cleanedValue:', cleanedValue) + const cleanedValue = await cleanDataV1(value, allMonitors) await KV_STORE.put(DATA_KEY, JSON.stringify(cleanedValue)) } export async function cleanDataV1(value: DataV1, allMonitors: Monitor[]) { const { bytes } = memorySizeOf(JSON.stringify(value)) - // eslint-disable-next-line no-console - console.debug('value bytes', bytes) // https://developers.cloudflare.com/kv/platform/limits/ // Value max size 25 MiB, in case of exceptions, we clean data when bytes bigger than 24 MiB. diff --git a/src/worker/cron/index.ts b/src/worker/cron/index.ts index 60f46ba..9928865 100644 --- a/src/worker/cron/index.ts +++ b/src/worker/cron/index.ts @@ -21,7 +21,6 @@ export async function handleCronTrigger(event: FetchEvent) { subrequests.required() const checkDay = getDate() const { kvData } = await getStore() - console.log('🚀 ~ file: index.ts:24 ~ handleCronTrigger ~ kvData:', kvData) subrequests.required() const { uncheckMonitors, lastCheckedMonitorIds, allMonitors } = await prepareMonitors()