Skip to content

Commit b8ee112

Browse files
authored
Merge pull request #338 from dmgav/redis-addr-sec
Modify Redis address validation code to allow passing security credentials with the address
2 parents 0ec0e5c + 6278297 commit b8ee112

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/black.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
# installation problems if out of date.
1616
python -m pip install --upgrade pip setuptools numpy
1717
18-
pip install black
18+
pip install black!=25.11.0
1919
- name: Run black
2020
run: |
2121
black . --check

bluesky_queueserver/manager/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,6 @@ def __init__(self, *, parser, args):
361361
value_config=self._get_value_from_config("redis_addr"),
362362
value_cli=self._args_existing("redis_addr"),
363363
)
364-
if redis_addr.count(":") > 1:
365-
raise ConfigError(f"Redis address is incorrectly formatted: {redis_addr}")
366364
self._settings["redis_addr"] = redis_addr
367365

368366
redis_name_prefix = self._get_param(

bluesky_queueserver/manager/plan_queue_ops.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ async def start(self):
257257
self._lock = asyncio.Lock()
258258
async with self._lock:
259259
try:
260-
host = f"redis://{self._redis_host}"
260+
if "://" not in self._redis_host:
261+
host = f"redis://{self._redis_host}"
262+
logger.debug("Connecting to Redis host at'%s'", host)
261263
self._r_pool = redis.asyncio.from_url(host, encoding="utf-8", decode_responses=True)
262264
await self._r_pool.ping()
263265
except Exception as ex:

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These are required for developing the package (running the tests, building
22
# the documentation) but not necessarily required for _using_ it.
3-
black
3+
black!=25.11.0
44
coverage
55
flake8
66
isort

0 commit comments

Comments
 (0)