Skip to content

Conversation

@ilfarpro
Copy link
Contributor

Description

When a remote runner was processing a transcoding job that got deleted from the PeerTube server, it would:

  1. Continue processing the job

  2. Generate repeated 404 errors on progress updates

  3. Waste resources completing the transcoding

  4. Eventually fail when trying to send success

  5. Generate more errors trying to report the failure

  6. Enhanced scheduleTranscodingProgress (common.ts)

  • Now detects 404 errors from job update calls
  • When a job is deleted (404 response), it:
  • Logs an informative message
  • Stops sending further updates
  • Calls an optional onAbort callback
  • Clears the update interval
  1. Updated All Job Processors
  • Modified all VOD transcoding functions to handle abortion gracefully:
  • Web Video Transcoding (processWebVideoTranscoding)
  • HLS Transcoding (processHLSTranscoding)
  • Audio Merge Transcoding (processAudioMergeTranscoding)
  • Studio Transcoding (processStudioTranscoding)
  • Video Transcription (processVideoTranscription)
  • Storyboard Generation (processGenerateStoryboard)
    Each now:
  • Uses an onAbort callback to set a jobAborted flag
  • Checks jobAborted after async operations (downloads, transcoding)
  • Returns early without sending success if aborted
  • Catches errors and silently returns if the job was aborted

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this PR does not update server code
  • 🙋 no

Sorry, haven't tested yet.

@ilfarpro ilfarpro closed this Oct 18, 2025
@ilfarpro ilfarpro reopened this Oct 18, 2025
@Chocobozzz
Copy link
Owner

Can you add tests? :)

@Chocobozzz Chocobozzz added the Status: Waiting for answer Waiting issue author answer label Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Waiting for answer Waiting issue author answer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants