吸收数字员工步骤自动调度
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
postDigitalEmployeeWorkdayAction,
|
||||
recordApprovalAction,
|
||||
restartManagedService,
|
||||
triggerCronCheck,
|
||||
} from '@/lib/api';
|
||||
import { isTauri } from '@/lib/tauri';
|
||||
import type {
|
||||
@@ -1600,8 +1601,15 @@ export default function CommandDeck({ onNavigate }: { onNavigate: (target: Digit
|
||||
throw new Error(response.error || '执行接口未接受请求');
|
||||
}
|
||||
const dispatchedCount = response.dispatched_tasks?.length ?? 0;
|
||||
const schedulerResult = await triggerCronCheck();
|
||||
const readyDispatched = schedulerResult.readyStepDispatch?.dispatched ?? 0;
|
||||
const readyFailed = schedulerResult.readyStepDispatch?.failed ?? 0;
|
||||
setExecutePlanItem(null);
|
||||
setActionNotice(`已触发执行:${planItem.title},已派发 ${dispatchedCount} 个步骤。`);
|
||||
setActionNotice(
|
||||
readyDispatched > 0 || readyFailed > 0
|
||||
? `已触发执行:${planItem.title},新建 ${dispatchedCount} 个步骤,Ready 步骤自动派发 ${readyDispatched} 个${readyFailed > 0 ? `,失败 ${readyFailed} 个` : ''}。`
|
||||
: `已触发执行:${planItem.title},已派发 ${dispatchedCount} 个步骤。`,
|
||||
);
|
||||
await fetchProjection();
|
||||
} catch (error) {
|
||||
if (mountedRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user