Skip to content

Commit 2c67eb1

Browse files
authored
Merge pull request #46 from thread/redis-password
Bump minor
2 parents f178b5d + d5d1e07 commit 2c67eb1

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

django_lightweight_queue/app_settings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Dict, Union, Mapping, TypeVar, Callable, Sequence
1+
from typing import Dict, Union, Mapping, TypeVar, Callable, Optional, Sequence
22

33
from django.conf import settings
44

@@ -42,6 +42,7 @@ def setting(suffix: str, default: T) -> T:
4242
# Backend-specific settings
4343
REDIS_HOST = setting('REDIS_HOST', '127.0.0.1') # type: str
4444
REDIS_PORT = setting('REDIS_PORT', 6379) # type: int
45+
REDIS_PASSWORD = setting('REDIS_PASSWORD', None) # type: Optional[str]
4546
REDIS_PREFIX = setting('REDIS_PREFIX', '') # type: str
4647

4748
ENABLE_PROMETHEUS = setting('ENABLE_PROMETHEUS', False) # type: bool

django_lightweight_queue/backends/redis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def __init__(self) -> None:
1717
self.client = redis.StrictRedis(
1818
host=app_settings.REDIS_HOST,
1919
port=app_settings.REDIS_PORT,
20+
password=app_settings.REDIS_PASSWORD,
2021
)
2122

2223
def enqueue(self, job: Job, queue: QueueName) -> None:

django_lightweight_queue/backends/reliable_redis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def __init__(self) -> None:
4040
self.client = redis.StrictRedis(
4141
host=app_settings.REDIS_HOST,
4242
port=app_settings.REDIS_PORT,
43+
password=app_settings.REDIS_PASSWORD,
4344
)
4445

4546
def startup(self, queue: QueueName) -> None:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-lightweight-queue"
3-
version = "4.1.1"
3+
version = "4.2.0"
44
description = "Lightweight & modular queue and cron system for Django"
55
authors = ["Thread Engineering <[email protected]>"]
66
license = "BSD-3-Clause"

0 commit comments

Comments
 (0)