tobymao / saq

Simple Async Queues
https://saq-py.readthedocs.io/en/latest/
MIT License
577 stars 39 forks source link

Can I use a custom serializer? #74

Closed kindaway closed 1 year ago

kindaway commented 1 year ago

I want to enqueue a job which will have a class from a 3rd party lib. It is not json serializable, but I can serialize it with pickle.dumps and loads without problems. How can I use pickle instead?

Thanks in advance, kindaway.

tobymao commented 1 year ago

set the dump and load lambdas

https://github.com/tobymao/saq/blob/dcdadbbb8cbde47351cb360053418a1aafe92913/saq/queue.py#L76