未验证 提交 1fdc63f9 编写于 作者: M Méril 提交者: GitHub

fix(telemetry): remove 1 week limit when lastUpdated is null (#527)

上级 38957dd1
......@@ -10,7 +10,7 @@ type LastUpdatedResponse = Readonly<{ lastUpdated?: string }>
const quest = new QuestDB.Client()
const start = async () => {
const weekOffset = 24 * 60 * 60 * 1000 * 7
const yearOffset = 24 * 60 * 60 * 1000 * 31 * 12
const result = await quest.query<ConfigShape>(Table.CONFIG)
let lastUpdated: string | undefined
......@@ -37,7 +37,7 @@ const start = async () => {
host: window.location.origin,
lastUpdated:
lastUpdated ||
new Date(new Date().getTime() - weekOffset).toISOString(),
new Date(new Date().getTime() - yearOffset).toISOString(),
}
worker.postMessage(payload)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册