celery/celery — pull request #1418 by rozza (2013-06-15 15:05:21+00:00)
Title: Handle any MongoDB connection option inline

Currently there is a mix of connection options for mongodb are confusing as there is a nested options dictionary for extra options.

CELERY_MONGODB_BACKEND_SETTINGS={
"host": "localhost",
"port": 27017,
"database": "celery_backend",
"options": {"use_greenlets": True}, # use_greenlets has to be nested
"taskmeta_collection": "my_taskmeta_collection"
}

This patch allows you to state options inline eg:

CELERY_MONGODB_BACKEND_SETTINGS={
"host": "localhost",
"port": 27017,
"database": "celery_backend",
"use_greenlets": True,
"taskmeta_collection": "my_taskmeta_collection"
}

Also sets `use_greenlets` automatically if using gevent.