Add back interval
This commit is contained in:
@@ -51,7 +51,7 @@ export class MetricsClient<M extends Record<string, any>> {
|
|||||||
}
|
}
|
||||||
this.queue.push(e)
|
this.queue.push(e)
|
||||||
|
|
||||||
logger.info(`event: ${e.event as string}`, e)
|
logger.debug(`event: ${e.event as string}`, e)
|
||||||
|
|
||||||
if (this.queue.length > this.maxBatchSize) {
|
if (this.queue.length > this.maxBatchSize) {
|
||||||
this.flush()
|
this.flush()
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
|||||||
// keep this, prefectching handles initial load
|
// keep this, prefectching handles initial load
|
||||||
staleTime: 1000 * 15,
|
staleTime: 1000 * 15,
|
||||||
queryKey: liveEventsQueryKey,
|
queryKey: liveEventsQueryKey,
|
||||||
|
refetchInterval: 1000 * 60 * 5, // refetch every 5 minutes
|
||||||
async queryFn() {
|
async queryFn() {
|
||||||
return fetchLiveEvents()
|
return fetchLiveEvents()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user