github derekshreds/Snacks v2.2.1
Snacks v2.2.1

latest release: v2.2.2
5 hours ago

Snacks v2.2.1

Automated Video Library Encoder

Patch release fixing cluster job lifecycle issues around master restarts, job cancellation, and orphaned work items.


Bug Fixes

Queue Resume on Master Restart

  • Immediate local queue restore -- pending and in-progress local items are now restored to the in-memory queue immediately on startup, without waiting for cluster recovery to finish probing remote nodes. Previously the entire queue was invisible for up to 5 minutes while recovery ran.
  • Remote orphan safety net -- after cluster recovery completes, any remote-assigned items that recovery missed are cleaned up and re-queued automatically.

Job Cancellation in Cluster Mode

  • DB assignment cleanup on cancel/stop -- cancelling or stopping a remote job now clears the AssignedNodeId in the database (via ClearRemoteAssignmentAsync). Previously only the in-memory state was cleared, leaving a stale assignment in the DB that caused the heartbeat reconciliation to protect cancelled jobs instead of cleaning them up.
  • Orphaned Processing item catch-all -- cancel and stop now handle Processing items that have no remote node assignment and are not actively encoding locally. These "orphan" items could occur after a dual-master conflict or interrupted dispatch and were previously impossible to cancel from the UI.
  • Cancel during upload/download no longer retries -- the chunked file transfer retry loops treated OperationCanceledException as a transient network error, retrying up to 60 times before giving up. Cancellations now propagate immediately and the upload or download stops without re-queuing the job.

Dispatch During Recovery

  • Dispatch no longer blocked by recovery -- the master dispatch loop previously waited for cluster recovery to fully complete before assigning any new work to nodes. New dispatches now run independently, relying on heartbeat status and existing availability checks to avoid conflicts with recovering jobs.

Files Changed

Modified Files

  • Snacks/Services/AutoScanService.cs -- split ResumeQueueFromDatabaseAsync into ResumeLocalQueueItemsAsync (immediate) and ResumeRemoteQueueItemsAsync (post-recovery)
  • Snacks/Services/TranscodingService.cs -- cancel/stop use ClearRemoteAssignmentAsync for remote jobs; added orphan catch-all branches in CancelWorkItemAsync and StopWorkItemAsync
  • Snacks/Services/ClusterService.cs -- removed _recoveryComplete gate from RunDispatchAsync; added OperationCanceledException handler in DispatchToNodeAsync to distinguish user cancellation from upload failure
  • Snacks/Services/ClusterFileTransferService.cs -- upload and download retry loops now rethrow OperationCanceledException instead of retrying

Full documentation: README.md

Don't miss a new Snacks release

NewReleases is sending notifications on new releases.