| | |
| | | try: |
| | | data = cls.__async_task_queue.get() |
| | | if data: |
| | | db = data[0] |
| | | method_name = data[1] |
| | | args = data[2] |
| | | _redis = RedisManager(db).getRedisNoPool() |
| | | method = getattr(RedisUtils, method_name) |
| | | if type(args) == tuple: |
| | | args = list(args) |
| | | args.insert(0, _redis) |
| | | args = tuple(args) |
| | | result = method(*args) |
| | | else: |
| | | args = tuple([_redis, args]) |
| | | result = method(*args) |
| | | |
| | | try: |
| | | db = data[0] |
| | | method_name = data[1] |
| | | args = data[2] |
| | | _redis = RedisManager(db).getRedisNoPool() |
| | | method = getattr(RedisUtils, method_name) |
| | | if type(args) == tuple: |
| | | args = list(args) |
| | | args.insert(0, _redis) |
| | | args = tuple(args) |
| | | result = method(*args) |
| | | else: |
| | | args = tuple([_redis, args]) |
| | | result = method(*args) |
| | | except Exception as e2: |
| | | logging.exception(e2) |
| | | logging.error(data) |
| | | except Exception as e1: |
| | | logging.exception(e1) |
| | | pass |