Automattic / Automattic/kue

when cleaning old jobs, console log several Error: job "xyz" doesnt exist

Open
#430 28 comments 0 reactions 0 assignees View on GitHub
Bug need more info
Dominant language
JavaScript
Stars
9.4k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

Hi,

I've created the following code to cleanup old jobs, but when I run it, kue logs throws many errors on console:
[Error: job "9940" doesnt exist]
[Error: job "9940" doesnt exist]
[Error: job "9940" doesnt exist]
[Error: job "9940" doesnt exist]
[Error: job "9940" doesnt exist]

I'm missing something?
Follows the gist for the cleanup code:
https://gist.github.com/thomasmodeneis/72a24fa57c960baa460c

Also on the webui few jobs still there as zombies, they dont actually exist but the counter on the left side still has few minor values like 1 sometimes 2,3.

I'm using "kue":"0.8.8"

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the cleanup code in the linked gist and reproduce the behavior on Kue 0.8.8, then trace the cleanup and WebUI job-count paths. Done means cleanup no longer logs errors for missing jobs and the WebUI no longer shows zombie jobs or incorrect residual counts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, redis
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.