Skip to content

Commit

Permalink
Merge pull request #1935 from camptocamp/backport/1934-to-master
Browse files Browse the repository at this point in the history
[Backport master] Allows redis protocol and all others
  • Loading branch information
sbrunner authored Aug 25, 2023
2 parents 48b067d + 6eaf61c commit e5be315
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Release 6.0

- The stats will not anymore be published on StatsD, use Prometheus client instead.
- The `C2C_REDIS_URL` will not be prefixed by `redis://` anymore, it will be used as is.

## Release 5.2

Expand Down
3 changes: 0 additions & 3 deletions c2cwsgiutils/redis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ def _init(settings: Optional[Mapping[str, Any]]) -> None:
_slave = _sentinel.slave_for(service_name)
return
if url:
if not url.startswith("redis://"):
url = "redis://" + url

LOG.info("Redis setup using: %s, with options: %s", url, redis_options_)
_master = redis.client.Redis.from_url(url, decode_responses=True, **redis_options)
_slave = _master
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ target-version = ['py310']
[tool.isort]
profile = "black"
line_length = 110
force_sort_within_sections = true

[tool.mypy]
python_version = 3.10
Expand Down

0 comments on commit e5be315

Please sign in to comment.