Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.45k stars 862 forks source link

search job by data #1135

Open osher opened 6 years ago

osher commented 6 years ago

Hi,

What mechanisms kue provides me for searching a job by it's data?

My use-case comes from the RTB world, where ad campaign settings need to be visited daily - unless the advertiser pulled the campaign off.

So consider I have a delayed job per campaign, that once visited - it reschedules for the next interval.

But - when the advertiser pulls the camaign - I need to be able to abort it.

While I can on job-process time go to the advertizer db and see if the campaign is still active, I fancy a hook in which I can find the job and abort it in real time.

I'd appreciate any input. If the functionality is there - great. If it rolls to a feature-request - AND if we react fast - I'll be able to help as long as I'm working on this project.

Thanks, O

sanchitbansal10 commented 5 years ago

I wrote an article that might help you https://medium.com/@sanchitbansal10/search-kue-jobs-by-job-data-c33972c04c6c