Created
January 4, 2015 17:05
-
-
Save igorkramaric/25baf6aa366b8f66698b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ujson | |
from kombu.serialization import kombu_register | |
kombu_register('ujson', ujson.dumps, ujson.loads, | |
content_type='application/x-ujson', | |
content_encoding='utf-8') | |
# Tell celery to use your ujson serializer: | |
CELERY_ACCEPT_CONTENT = ['ujson'] | |
CELERY_TASK_SERIALIZER = 'ujson' | |
CELERY_RESULT_SERIALIZER = 'ujson' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment