def _get_lock(): """Get mongolock instance using app mongodb.""" return mongolock.MongoLock(client=app.data.mongo.pymongo().db)
def _get_lock(): """Get mongolock instance using app mongodb.""" app.register_resource('_lock', _lock_resource_settings) # setup dummy resource for locks return mongolock.MongoLock(client=app.data.mongo.pymongo('_lock').db)