示例#1
0
文件: lock.py 项目: idtlabs-xyz/eden
def _get_lock():
    """Get mongolock instance using app mongodb."""
    return mongolock.MongoLock(client=app.data.mongo.pymongo().db)
示例#2
0
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)