Skip to content

Commit

Permalink
bugfix for Redis connection args
Browse files Browse the repository at this point in the history
  • Loading branch information
JarryShaw committed Jan 20, 2024
1 parent 138df6b commit 8c9afa3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions darc/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
from darc.logging import logger

if TYPE_CHECKING:
from datetime import timedelta
from datetime import timedelta # noqa: F401
from multiprocessing import Lock as ProcessLock
from threading import Lock as ThreadLock
from typing import Optional, Union
from typing import Optional, Union # noqa: F401

from peewee import Database
from redis import Redis
from peewee import Database # noqa: F401
from redis import Redis # noqa: F401

# reboot mode?
REBOOT = bool(int(os.getenv('DARC_REBOOT', '0')))
Expand Down Expand Up @@ -163,7 +163,7 @@
REDIS = None # type: Optional[Redis]
FLAG_DB = True
else:
REDIS = redis.Redis.from_url(_REDIS_URL, decode_components=True) # type: ignore[call-overload]
REDIS = redis.Redis.from_url(_REDIS_URL)
FLAG_DB = False
del _REDIS_URL

Expand Down

0 comments on commit 8c9afa3

Please sign in to comment.