celery/celery — pull request #1979 by ocean1 (2014-04-11 23:16:11+00:00)
Title: let pymongo serialize task_meta natively if native_serialize backend option set

Right now all the task_meta are "double encoded" in a Binary format (mongo BinData), only pickle and msgpack should need this while json and yaml can be saved as a string (actually a "strict" json format could be saved natively in mongo too, but didn't test this), with this patch:
- Binary format is used only for pickle and msgpack
- an option is added to the mongo backend to enable it to serialize natively the task_meta

it was not possible to create a kombu mongo serializer since it would have been useless or just needed to check if the object can be serializable (and then it would need to be serialized again) because pymongo don't recognize that we are sending BSON data to it and it would get double encoded (should it be needed a patch could also be submitted upstream to pymongo)