livepeer / livepeer/studio

Stuck VOD tasks

Open
#1,103 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
88
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
When requesting certain tasks in VOD API ie. Import, Transcode, the tasks may be stuck in a false Waiting state if the task was never actually queued to run. This could happen if the API was unable to access the tasks queues due to credentials etc.

Expected behavior
Tasks which never made it into the task-runner queues should be put into a Failed state directly.

Additional context
enqueueTask in the scheduler could fail, provide a failure callback that sets the task state to Failed

https://github.com/livepeer/livepeer-com/blob/d3bd5c6e2d133436024b6df09592370a565d8e53/packages/api/src/task/scheduler.ts#L165

https://github.com/livepeer/livepeer-com/blob/d3bd5c6e2d133436024b6df09592370a565d8e53/packages/api/src/store/queue.ts#L224

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/api/src/task/scheduler.ts around enqueueTask and inspect the queue handling in packages/api/src/store/queue.ts around line 224. Trace how queue-access failures are reported and how VOD task state is updated. Done means an Import or Transcode task that was never queued reaches Failed rather than remaining in Waiting.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.