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

place indexing before callback invoked #1222

Closed sicknarlo closed 1 year ago

sicknarlo commented 5 years ago

fixes #886

Invoking the callback before the function opens to door for a race condition when searching. Movin when the index is called fixes this.

Of course this comes with a cost, however, if the user has opted into searching then making sure it works and all jobs are searchable when the callback is invoked is worth it.