mirror of
https://github.com/langgenius/dify.git
synced 2026-04-02 12:50:34 +08:00
fix: plugin task
This commit is contained in:
parent
3f2baf0131
commit
35eafd239d
@ -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
Block a user