mirror of https://github.com/langgenius/dify.git
Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins
This commit is contained in:
commit
f53b658964
|
|
@ -9,6 +9,7 @@ import type {
|
|||
PluginsFromMarketplaceResponse,
|
||||
uploadGitHubResponse,
|
||||
} from '@/app/components/plugins/types'
|
||||
import { TaskStatus } from '@/app/components/plugins/types'
|
||||
import type {
|
||||
PluginsSearchParams,
|
||||
} from '@/app/components/plugins/marketplace/types'
|
||||
|
|
@ -217,14 +218,14 @@ export const usePluginTaskList = () => {
|
|||
queryKey: usePluginTaskListKey,
|
||||
queryFn: async () => {
|
||||
const currentData = await get<{ tasks: PluginTask[] }>('/workspaces/current/plugin/tasks?page=1&page_size=100')
|
||||
const taskDone = currentData.tasks.every(task => task.total_plugins === task.completed_plugins)
|
||||
const taskDone = currentData.tasks.every(task => task.status === TaskStatus.success)
|
||||
|
||||
if (taskDone)
|
||||
setEnabled(false)
|
||||
|
||||
return currentData
|
||||
},
|
||||
// refetchInterval: 5000,
|
||||
refetchInterval: 5000,
|
||||
enabled,
|
||||
})
|
||||
const handleRefetch = useCallback(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue