Skip to content

Commit

Permalink
fix(dashboards): don't always always refresh (#18987)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra authored Dec 1, 2023
1 parent 3a85190 commit 7c5604f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/scenes/dashboard/dashboardLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -949,13 +949,15 @@ export const dashboardLogic = kea<dashboardLogicType>([
let refreshesFinished = 0
let totalResponseBytes = 0

const hardRefreshWithoutCache = action === 'refresh_manual' || action === 'refresh_above_threshold'

// array of functions that reload each item
const fetchItemFunctions = insights.map((insight) => async () => {
// :TODO: Support query cancellation and use this queryId in the actual query.
const queryId = `${dashboardQueryId}::${uuid()}`
const queryStartTime = performance.now()
const apiUrl = `api/projects/${values.currentTeamId}/insights/${insight.id}/?${toParams({
refresh: true,
refresh: hardRefreshWithoutCache,
from_dashboard: dashboardId, // needed to load insight in correct context
client_query_id: queryId,
session_id: currentSessionId(),
Expand Down

0 comments on commit 7c5604f

Please sign in to comment.