feat: Refactor payload encoding/decoding for extensibility
new Queue(driver, name, {
decodePayload: payload => payload,
encodePayload: payload => payload,
})
Demo (before/after)
I'm all for this change. Do you mind adding a little bit of context for the bug or use case this PR addresses? It'll help other people if they had this issue also find the fix and what version they'll be needing.
Thank you for your feedback, I just want to offer a way to conveniently data serialization, which can be useful for MongoDB users (the ability to find a job by its payload)
new Queue(driver, name, {
decodePayload: payload => payload,
encodePayload: payload => payload,
})
Demo (before/after)
Or maybe...
- #19
I think the approach you have here w/ instance based encode/decode is the correct way to do this. The tests are failing, but that is likely a "me" problem, because we haven't had to update the tooling and cut a release in a while.