Skip to content
Snippets Groups Projects
Commit 58759ad2ec35 authored by Patrice Journoud's avatar Patrice Journoud
Browse files

obsolete file supression

parent a3818007090f
Branches branch/default
No related tags found
No related merge requests found
# import redis
#
#
# class Optimization(object):
#
# def __init__(self):
# db = redis.Redis('localhost')
# def save_distance(self, key, value):
# """Save a key with some data into Redis.
# """
# try:
# # unicode objects must be encoded before hashing so we encode to
# # utf-8
# # TODO ?? Where does this encoding happen?
# with (yield from self.redis_pool) as conn:
# yield from conn.set(key, info)
# except (aioredis.ReplyError, aioredis.ProtocolError):
# return False
# return True
# def get_key_info(self, key: str) -> str:
# """Retrieve data about a key from Redis, or None if unavailable.
# """
# try:
# with (yield from self.redis_pool) as conn:
# info = yield from conn.get(key)
# except (aioredis.ReplyError, aioredis.ProtocolError):
# return None
# if info is None:
# return None
# return info.decode("utf-8")
# def destroy_key(self, key: str) -> bool:
# try:
# with (yield from self.redis_pool) as conn:
# yield from conn.delete(key)
# except (aioredis.ReplyError, aioredis.ProtocolError):
# return False
# return True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment