0.12.0-12 Job Fix
This commit is contained in:
@@ -981,6 +981,17 @@ export default function DashboardPage({
|
||||
() => buildCdDriveLifecycleKey(pipeline?.cdDrives),
|
||||
[pipeline?.cdDrives]
|
||||
);
|
||||
// Detects when a background job reaches a terminal interactive state via PIPELINE_PROGRESS
|
||||
// (e.g. READY_TO_ENCODE or WAITING_FOR_USER_DECISION), triggering a dashboard jobs reload.
|
||||
const jobProgressInteractiveKey = useMemo(() => Object.entries(pipeline?.jobProgress || {})
|
||||
.filter(([, v]) => {
|
||||
const s = String(v?.state || '').toUpperCase();
|
||||
return s === 'READY_TO_ENCODE' || s === 'WAITING_FOR_USER_DECISION';
|
||||
})
|
||||
.map(([id]) => id)
|
||||
.sort()
|
||||
.join(','),
|
||||
[pipeline?.jobProgress]);
|
||||
const monitoringSample = monitoringState.sample;
|
||||
const cpuMetrics = monitoringSample?.cpu || null;
|
||||
const memoryMetrics = monitoringSample?.memory || null;
|
||||
@@ -1215,7 +1226,7 @@ export default function DashboardPage({
|
||||
|
||||
useEffect(() => {
|
||||
void loadDashboardJobs();
|
||||
}, [pipeline?.state, pipeline?.activeJobId, pipeline?.context?.jobId, cdDriveLifecycleKey, jobsRefreshToken]);
|
||||
}, [pipeline?.state, pipeline?.activeJobId, pipeline?.context?.jobId, cdDriveLifecycleKey, jobsRefreshToken, jobProgressInteractiveKey]);
|
||||
|
||||
useEffect(() => {
|
||||
api.getDetectedDrives()
|
||||
|
||||
Reference in New Issue
Block a user