Skip to content

Commit

Permalink
Merge pull request #306 from labmlai/relod-fix
Browse files Browse the repository at this point in the history
remove force reload timeout
  • Loading branch information
lakshith-403 authored Oct 22, 2024
2 parents a24c740 + 0c6ad2b commit 9a33fc4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/ui/src/cache/cache.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import {ProcessData} from "../analyses/sessions/process/types"
import {Config} from "../models/config"

const RELOAD_TIMEOUT = 60 * 1000
const FORCE_RELOAD_TIMEOUT = 5 * 1000
const FORCE_RELOAD_TIMEOUT = -1

export function isReloadTimeout(lastUpdated: number): boolean {
return (new Date()).getTime() - lastUpdated > RELOAD_TIMEOUT
@@ -471,10 +471,8 @@ export class CustomMetricCache extends CacheObject<CustomMetricList> {
}

async load(): Promise<CustomMetricList> {
return this.broadcastPromise.create(async () => {
let data = await NETWORK.getCustomMetrics(this.uuid)
return new CustomMetricList(data)
})
let data = await NETWORK.getCustomMetrics(this.uuid)
return new CustomMetricList(data)
}

async createMetric(data: object): Promise<CustomMetric> {

0 comments on commit 9a33fc4

Please sign in to comment.