0.12.0-14 Log Fix
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ripster-backend",
|
"name": "ripster-backend",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ripster-backend",
|
"name": "ripster-backend",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ripster-backend",
|
"name": "ripster-backend",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ripster-frontend",
|
"name": "ripster-frontend",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ripster-frontend",
|
"name": "ripster-frontend",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"primeicons": "^7.0.0",
|
"primeicons": "^7.0.0",
|
||||||
"primereact": "^10.9.2",
|
"primereact": "^10.9.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ripster-frontend",
|
"name": "ripster-frontend",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -315,8 +315,7 @@ export default function PipelineStatusCard({
|
|||||||
onRetry,
|
onRetry,
|
||||||
onDeleteJob,
|
onDeleteJob,
|
||||||
isQueued = false,
|
isQueued = false,
|
||||||
busy,
|
busy
|
||||||
liveJobLog = ''
|
|
||||||
}) {
|
}) {
|
||||||
const state = pipeline?.state || 'IDLE';
|
const state = pipeline?.state || 'IDLE';
|
||||||
const stateLabel = getStatusLabel(state);
|
const stateLabel = getStatusLabel(state);
|
||||||
@@ -331,6 +330,7 @@ export default function PipelineStatusCard({
|
|||||||
const reviewMode = String(mediaInfoReview?.mode || '').trim().toLowerCase();
|
const reviewMode = String(mediaInfoReview?.mode || '').trim().toLowerCase();
|
||||||
const isPreRipReview = reviewMode === 'pre_rip' || Boolean(mediaInfoReview?.preRip);
|
const isPreRipReview = reviewMode === 'pre_rip' || Boolean(mediaInfoReview?.preRip);
|
||||||
const jobMediaProfile = resolvePipelineMediaProfile(pipeline, mediaInfoReview);
|
const jobMediaProfile = resolvePipelineMediaProfile(pipeline, mediaInfoReview);
|
||||||
|
const [liveJobLog, setLiveJobLog] = useState('');
|
||||||
const [selectedEncodeTitleId, setSelectedEncodeTitleId] = useState(null);
|
const [selectedEncodeTitleId, setSelectedEncodeTitleId] = useState(null);
|
||||||
const [selectedPlaylistId, setSelectedPlaylistId] = useState(null);
|
const [selectedPlaylistId, setSelectedPlaylistId] = useState(null);
|
||||||
const [selectedHandBrakeTitleIdState, setSelectedHandBrakeTitleIdState] = useState(null);
|
const [selectedHandBrakeTitleIdState, setSelectedHandBrakeTitleIdState] = useState(null);
|
||||||
@@ -592,6 +592,30 @@ export default function PipelineStatusCard({
|
|||||||
pipeline?.context?.selectedPlaylist
|
pipeline?.context?.selectedPlaylist
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!running || !retryJobId) {
|
||||||
|
setLiveJobLog('');
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
let cancelled = false;
|
||||||
|
const refresh = async () => {
|
||||||
|
try {
|
||||||
|
const response = await api.getJob(retryJobId, { includeLiveLog: true, lite: true });
|
||||||
|
if (!cancelled) {
|
||||||
|
setLiveJobLog(response?.job?.log || '');
|
||||||
|
}
|
||||||
|
} catch (_err) {
|
||||||
|
// ignore transient polling errors
|
||||||
|
}
|
||||||
|
};
|
||||||
|
void refresh();
|
||||||
|
const interval = setInterval(refresh, 2500);
|
||||||
|
return () => {
|
||||||
|
cancelled = true;
|
||||||
|
clearInterval(interval);
|
||||||
|
};
|
||||||
|
}, [running, retryJobId]);
|
||||||
|
|
||||||
const playlistDecisionRequiredBeforeStart = state === 'WAITING_FOR_USER_DECISION' && !handBrakeTitleDecisionRequired;
|
const playlistDecisionRequiredBeforeStart = state === 'WAITING_FOR_USER_DECISION' && !handBrakeTitleDecisionRequired;
|
||||||
const commandOutputPath = useMemo(
|
const commandOutputPath = useMemo(
|
||||||
() => buildOutputPathPreview(settingsMap, jobMediaProfile, selectedMetadata, retryJobId),
|
() => buildOutputPathPreview(settingsMap, jobMediaProfile, selectedMetadata, retryJobId),
|
||||||
|
|||||||
@@ -933,7 +933,6 @@ export default function DashboardPage({
|
|||||||
const [queueReorderBusy, setQueueReorderBusy] = useState(false);
|
const [queueReorderBusy, setQueueReorderBusy] = useState(false);
|
||||||
const [draggingQueueEntryId, setDraggingQueueEntryId] = useState(null);
|
const [draggingQueueEntryId, setDraggingQueueEntryId] = useState(null);
|
||||||
const [insertQueueDialog, setInsertQueueDialog] = useState({ visible: false, afterEntryId: null });
|
const [insertQueueDialog, setInsertQueueDialog] = useState({ visible: false, afterEntryId: null });
|
||||||
const [liveJobLog, setLiveJobLog] = useState('');
|
|
||||||
const [runtimeActivities, setRuntimeActivities] = useState(() => normalizeRuntimeActivitiesPayload(null));
|
const [runtimeActivities, setRuntimeActivities] = useState(() => normalizeRuntimeActivitiesPayload(null));
|
||||||
const [runtimeLoading, setRuntimeLoading] = useState(false);
|
const [runtimeLoading, setRuntimeLoading] = useState(false);
|
||||||
const [runtimeActionBusyKeys, setRuntimeActionBusyKeys] = useState(() => new Set());
|
const [runtimeActionBusyKeys, setRuntimeActionBusyKeys] = useState(() => new Set());
|
||||||
@@ -960,15 +959,6 @@ export default function DashboardPage({
|
|||||||
const state = String(pipeline?.state || 'IDLE').trim().toUpperCase();
|
const state = String(pipeline?.state || 'IDLE').trim().toUpperCase();
|
||||||
const currentPipelineJobId = normalizeJobId(pipeline?.activeJobId || pipeline?.context?.jobId);
|
const currentPipelineJobId = normalizeJobId(pipeline?.activeJobId || pipeline?.context?.jobId);
|
||||||
const isProcessing = processingStates.includes(state);
|
const isProcessing = processingStates.includes(state);
|
||||||
// Always prefer the ENCODING job from dashboardJobs for the live log.
|
|
||||||
// When a second job enters ANALYZING, isProcessing becomes true (ANALYZING is a processingState)
|
|
||||||
// and currentPipelineJobId switches to job2 — but job1 is still ENCODING and its log must stay visible.
|
|
||||||
const encodingJobId = useMemo(() => {
|
|
||||||
const bg = dashboardJobs.find((job) => normalizeStatus(job?.status) === 'ENCODING');
|
|
||||||
return bg ? normalizeJobId(bg.id) : null;
|
|
||||||
}, [dashboardJobs]);
|
|
||||||
const liveLogJobId = encodingJobId || currentPipelineJobId;
|
|
||||||
const liveLogActive = isProcessing || Boolean(encodingJobId);
|
|
||||||
const monitoringState = useMemo(
|
const monitoringState = useMemo(
|
||||||
() => normalizeHardwareMonitoringPayload(hardwareMonitoring),
|
() => normalizeHardwareMonitoringPayload(hardwareMonitoring),
|
||||||
[hardwareMonitoring]
|
[hardwareMonitoring]
|
||||||
@@ -1314,31 +1304,6 @@ export default function DashboardPage({
|
|||||||
return undefined;
|
return undefined;
|
||||||
}, [audiobookUploadPhase]);
|
}, [audiobookUploadPhase]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!liveLogJobId || !liveLogActive) {
|
|
||||||
setLiveJobLog('');
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
let cancelled = false;
|
|
||||||
const refreshLiveLog = async () => {
|
|
||||||
try {
|
|
||||||
const response = await api.getJob(liveLogJobId, { includeLiveLog: true, lite: true });
|
|
||||||
if (!cancelled) {
|
|
||||||
setLiveJobLog(response?.job?.log || '');
|
|
||||||
}
|
|
||||||
} catch (_error) {
|
|
||||||
// ignore transient polling errors to avoid noisy toasts while background polling
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void refreshLiveLog();
|
|
||||||
const interval = setInterval(refreshLiveLog, 2500);
|
|
||||||
return () => {
|
|
||||||
cancelled = true;
|
|
||||||
clearInterval(interval);
|
|
||||||
};
|
|
||||||
}, [liveLogJobId, liveLogActive]);
|
|
||||||
|
|
||||||
const pipelineByJobId = useMemo(() => {
|
const pipelineByJobId = useMemo(() => {
|
||||||
const map = new Map();
|
const map = new Map();
|
||||||
@@ -2841,7 +2806,7 @@ export default function DashboardPage({
|
|||||||
const statusBadgeValue = getStatusLabel(job?.status, { queued: isQueued });
|
const statusBadgeValue = getStatusLabel(job?.status, { queued: isQueued });
|
||||||
const statusBadgeSeverity = getStatusSeverity(normalizedStatus, { queued: isQueued });
|
const statusBadgeSeverity = getStatusSeverity(normalizedStatus, { queued: isQueued });
|
||||||
const isExpanded = normalizeJobId(expandedJobId) === jobId;
|
const isExpanded = normalizeJobId(expandedJobId) === jobId;
|
||||||
const isCurrentSession = liveLogJobId === jobId && (state !== 'IDLE' || liveLogActive);
|
const isCurrentSession = jobId === currentPipelineJobId && state !== 'IDLE';
|
||||||
const reviewConfirmed = Boolean(Number(job?.encode_review_confirmed || 0));
|
const reviewConfirmed = Boolean(Number(job?.encode_review_confirmed || 0));
|
||||||
const pipelineForJob = pipelineByJobId.get(jobId) || pipeline;
|
const pipelineForJob = pipelineByJobId.get(jobId) || pipeline;
|
||||||
const jobTitle = job?.title || job?.detected_title || `Job #${jobId}`;
|
const jobTitle = job?.title || job?.detected_title || `Job #${jobId}`;
|
||||||
@@ -2981,7 +2946,6 @@ export default function DashboardPage({
|
|||||||
onRemoveFromQueue={handleRemoveQueuedJob}
|
onRemoveFromQueue={handleRemoveQueuedJob}
|
||||||
isQueued={isQueued}
|
isQueued={isQueued}
|
||||||
busy={busyJobIds.has(jobId)}
|
busy={busyJobIds.has(jobId)}
|
||||||
liveJobLog={isCurrentSession ? liveJobLog : ''}
|
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ripster",
|
"name": "ripster",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ripster",
|
"name": "ripster",
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^9.1.2"
|
"concurrently": "^9.1.2"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ripster",
|
"name": "ripster",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.12.0-13",
|
"version": "0.12.0-14",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "concurrently \"npm run dev --prefix backend\" \"npm run dev --prefix frontend\"",
|
"dev": "concurrently \"npm run dev --prefix backend\" \"npm run dev --prefix frontend\"",
|
||||||
"dev:backend": "npm run dev --prefix backend",
|
"dev:backend": "npm run dev --prefix backend",
|
||||||
|
|||||||
Reference in New Issue
Block a user