Skip to content

Commit e9b83fd

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 8c5ec78 + b2f5ba1 commit e9b83fd

15 files changed

+1345
-465
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022-2024 Pavel Kirilin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docker-compose.yml

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,29 @@ services:
1313
start_period: 10s
1414
ports:
1515
- 7000:6379
16-
redis-node-0:
16+
redis-node-0: &redis-node
1717
image: docker.io/bitnami/redis-cluster:7.2
1818
environment:
1919
ALLOW_EMPTY_PASSWORD: "yes"
2020
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
21+
healthcheck:
22+
test: ["CMD", "redis-cli", "ping"]
23+
interval: 5s
24+
timeout: 5s
25+
retries: 3
26+
start_period: 10s
2127

2228
redis-node-1:
23-
image: docker.io/bitnami/redis-cluster:7.2
24-
environment:
25-
ALLOW_EMPTY_PASSWORD: "yes"
26-
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
29+
<<: *redis-node
2730

2831
redis-node-2:
29-
image: docker.io/bitnami/redis-cluster:7.2
30-
environment:
31-
ALLOW_EMPTY_PASSWORD: "yes"
32-
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
32+
<<: *redis-node
3333

3434
redis-node-3:
35-
image: docker.io/bitnami/redis-cluster:7.2
36-
environment:
37-
ALLOW_EMPTY_PASSWORD: "yes"
38-
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
35+
<<: *redis-node
3936

4037
redis-node-4:
41-
image: docker.io/bitnami/redis-cluster:7.2
42-
environment:
43-
ALLOW_EMPTY_PASSWORD: "yes"
44-
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
38+
<<: *redis-node
4539

4640
redis-node-5:
4741
image: docker.io/bitnami/redis-cluster:7.2
@@ -56,5 +50,38 @@ services:
5650
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
5751
REDIS_CLUSTER_REPLICAS: 1
5852
REDIS_CLUSTER_CREATOR: "yes"
53+
healthcheck:
54+
test: ["CMD", "redis-cli", "ping"]
55+
interval: 5s
56+
timeout: 5s
57+
retries: 3
58+
start_period: 10s
5959
ports:
6060
- 7001:6379
61+
62+
redis-master:
63+
image: bitnami/redis:6.2.5
64+
environment:
65+
ALLOW_EMPTY_PASSWORD: "yes"
66+
healthcheck:
67+
test: ["CMD", "redis-cli", "ping"]
68+
interval: 5s
69+
timeout: 5s
70+
retries: 3
71+
start_period: 10s
72+
73+
redis-sentinel:
74+
image: bitnami/redis-sentinel:latest
75+
depends_on:
76+
- redis-master
77+
environment:
78+
ALLOW_EMPTY_PASSWORD: "yes"
79+
REDIS_MASTER_HOST: "redis-master"
80+
healthcheck:
81+
test: ["CMD", "redis-cli", "-p", "26379", "ping"]
82+
interval: 5s
83+
timeout: 5s
84+
retries: 3
85+
start_period: 10s
86+
ports:
87+
- 7002:26379

poetry.lock

Lines changed: 389 additions & 383 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "taskiq-redis"
3-
version = "0.5.6"
3+
version = "1.0.0"
44
description = "Redis integration for taskiq"
55
authors = ["taskiq-team <taskiq@norely.com>"]
66
readme = "README.md"
@@ -26,7 +26,7 @@ keywords = [
2626

2727
[tool.poetry.dependencies]
2828
python = "^3.8.1"
29-
taskiq = ">=0.10.3,<1"
29+
taskiq = ">=0.11.1,<1"
3030
redis = "^5"
3131

3232
[tool.poetry.group.dev.dependencies]
@@ -40,7 +40,7 @@ fakeredis = "^2"
4040
pre-commit = "^2.20.0"
4141
pytest-xdist = { version = "^2.5.0", extras = ["psutil"] }
4242
ruff = "^0.1.0"
43-
types-redis = "^4.6.0.7"
43+
types-redis = "^4.6.0.20240425"
4444

4545
[tool.mypy]
4646
strict = true

taskiq_redis/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,30 @@
22
from taskiq_redis.redis_backend import (
33
RedisAsyncClusterResultBackend,
44
RedisAsyncResultBackend,
5+
RedisAsyncSentinelResultBackend,
56
)
67
from taskiq_redis.redis_broker import ListQueueBroker, PubSubBroker
78
from taskiq_redis.redis_cluster_broker import ListQueueClusterBroker
9+
from taskiq_redis.redis_sentinel_broker import (
10+
ListQueueSentinelBroker,
11+
PubSubSentinelBroker,
12+
)
813
from taskiq_redis.schedule_source import (
914
RedisClusterScheduleSource,
1015
RedisScheduleSource,
16+
RedisSentinelScheduleSource,
1117
)
1218

1319
__all__ = [
1420
"RedisAsyncClusterResultBackend",
1521
"RedisAsyncResultBackend",
22+
"RedisAsyncSentinelResultBackend",
1623
"ListQueueBroker",
1724
"PubSubBroker",
1825
"ListQueueClusterBroker",
26+
"ListQueueSentinelBroker",
27+
"PubSubSentinelBroker",
1928
"RedisScheduleSource",
2029
"RedisClusterScheduleSource",
30+
"RedisSentinelScheduleSource",
2131
]

0 commit comments

Comments
 (0)