fix workflow run dead state after diagnostics back nav (#4776)
Co-authored-by: Suchintan Singh <suchintan@skyvern.com>
This commit is contained in:
@@ -70,7 +70,9 @@ function TaskDetails() {
|
|||||||
|
|
||||||
const { data: workflowRun, isLoading: workflowRunIsLoading } =
|
const { data: workflowRun, isLoading: workflowRunIsLoading } =
|
||||||
useQuery<WorkflowRunStatusApiResponse>({
|
useQuery<WorkflowRunStatusApiResponse>({
|
||||||
queryKey: ["workflowRun", task?.workflow_run_id],
|
// Keep this cache separate from workflow-run pages, which store
|
||||||
|
// a richer payload under ["workflowRun", workflowRunId].
|
||||||
|
queryKey: ["taskWorkflowRun", task?.workflow_run_id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const client = await getClient(credentialGetter);
|
const client = await getClient(credentialGetter);
|
||||||
return client
|
return client
|
||||||
@@ -110,6 +112,9 @@ function TaskDetails() {
|
|||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ["workflowRun", task.workflow_run_id],
|
queryKey: ["workflowRun", task.workflow_run_id],
|
||||||
});
|
});
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: ["taskWorkflowRun", task.workflow_run_id],
|
||||||
|
});
|
||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: [
|
queryKey: [
|
||||||
"workflowRun",
|
"workflowRun",
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ function WorkflowRunStream(props?: Props) {
|
|||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ["workflowRun", workflowRunId],
|
queryKey: ["workflowRun", workflowRunId],
|
||||||
});
|
});
|
||||||
|
queryClient.invalidateQueries({
|
||||||
|
queryKey: ["taskWorkflowRun", workflowRunId],
|
||||||
|
});
|
||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ["workflowTasks", workflowRunId],
|
queryKey: ["workflowTasks", workflowRunId],
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user