Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleting job without expiryKey? #98

Open
stevenpalomino opened this issue Jun 8, 2017 · 3 comments
Open

deleting job without expiryKey? #98

stevenpalomino opened this issue Jun 8, 2017 · 3 comments

Comments

@stevenpalomino
Copy link

Currently I have a job running every hour and new jobs get created at times but there's no expiryKey until they run for the first time. Is there a way to delete a job without expiryKey?

@samhunta
Copy link
Contributor

Per the docs, you can use queue.remove({ unique: 'myJob' }) where myJob is the job name.

@crossman
Copy link

crossman commented Sep 1, 2017

@samhunta have you actually gotten that to work? I'm trying to remove jobs by unique right now and they don't get removed. I took a look at the spec and it appears there is no test for that functionality either.

@rafaismyname
Copy link

@crossman we had the very same issue! the solution was to query for the job id directly to redis, and then use .remove(jobId) :(

kue.client.hget('[myPrefix]:unique:jobs', myUniqueId, (id) => {
  kue.remove(Number(id), (err, result) => console.log(err, result));
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants