How to use the databases.factory function in databases

To help you get started, we’ve selected a few databases examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bwhite / picarus / server / rest_server.py View on Github external
def THRIFT_CONSTRUCTOR():
        return databases.factory(ARGS.database, ARGS.local, JOBS,
                                 thrift_server=ARGS.thrift_server, thrift_port=ARGS.thrift_port,
                                 redis_host=ARGS.redis_host, redis_port=ARGS.redis_port)
    for x in range(16):
github bwhite / picarus / server / jobs.py View on Github external
def THRIFT_CONSTRUCTOR():
        return databases.factory(args.database, True, jobs,
                                 thrift_server=args.thrift_server, thrift_port=args.thrift_port,
                                 redis_host=args.redis_host, redis_port=args.redis_port)
    args.func(args, jobs)