mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-01 18:20:06 +00:00
Add better cache invalidation for history (#1838)
Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
parent
13213d4523
commit
ae9380f03f
5 changed files with 15 additions and 0 deletions
|
@ -173,6 +173,9 @@ function CreateNewTaskForm({ initialValues }: Props) {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: ["tasks"],
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["runs"],
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -40,6 +40,9 @@ function ExampleCasePill({ exampleId, version, icon, label, prompt }: Props) {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: ["workflows"],
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["runs"],
|
||||
});
|
||||
navigate(
|
||||
`/workflows/${response.data.workflow_permanent_id}/${response.data.workflow_run_id}`,
|
||||
);
|
||||
|
|
|
@ -184,6 +184,9 @@ function PromptBox() {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: ["workflows"],
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["runs"],
|
||||
});
|
||||
navigate(
|
||||
`/workflows/${response.data.workflow_permanent_id}/${response.data.workflow_run_id}`,
|
||||
);
|
||||
|
|
|
@ -136,6 +136,9 @@ function RunWorkflowForm({
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: ["workflowRuns"],
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["runs"],
|
||||
});
|
||||
navigate(
|
||||
`/workflows/${workflowPermanentId}/${response.data.workflow_run_id}/overview`,
|
||||
);
|
||||
|
|
|
@ -69,6 +69,9 @@ function WorkflowRunStream() {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: ["workflowTasks", workflowRunId],
|
||||
});
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ["runs"],
|
||||
});
|
||||
if (
|
||||
message.status === "failed" ||
|
||||
message.status === "terminated"
|
||||
|
|
Loading…
Add table
Reference in a new issue