mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): create debounced metadata/workflow query hooks
Also added config options for metadata and workflow debounce times (`metadataFetchDebounce` & `workflowFetchDebounce`). Falls back to 0 if not provided. In OSS, because we have no major latency concerns, the debounce is 0. But in other environments, it may be desirable to set this to something like 300ms.
This commit is contained in:
@ -7,7 +7,6 @@ export const workflowsApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
getWorkflow: build.query<Workflow | undefined, string>({
|
||||
query: (workflow_id) => `workflows/i/${workflow_id}`,
|
||||
keepUnusedDataFor: 86400, // 24 hours
|
||||
providesTags: (result, error, workflow_id) => [
|
||||
{ type: 'Workflow', id: workflow_id },
|
||||
],
|
||||
|
Reference in New Issue
Block a user