mojolicious / minion

:octopus: Perl high performance job queue
https://metacpan.org/release/Minion
Artistic License 2.0
224 stars 56 forks source link

Allow list_jobs to filter by existence of notes keys #84

Closed kraih closed 5 years ago

kraih commented 5 years ago

The idea is to be able to tag jobs with a note, like $minion->enqueue('test', [], {notes => {test_123 => 1}}), and then be able to retrieve (and perhaps modify) all jobs tagged similarly with $minion->backend->list_jobs(0, 100, {notes => ['test_123']}).

Searching for jobs with specific arguments is a commonly requested feature, but very hard to do efficiently (and correctly), especially when complex data structures are involved. This is a much simpler alternative that should cover most of the use cases of argument searching, and thanks to the GIN index it is also incredibly efficient.

Downside would be that it is not easy to implement for alternative backends like SQLite.