Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius committed Jun 11, 2024
2 parents 8c5ec78 + b2f5ba1 commit e9b83fd
Show file tree
Hide file tree
Showing 15 changed files with 1,345 additions and 465 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-2024 Pavel Kirilin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
61 changes: 44 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,29 @@ services:
start_period: 10s
ports:
- 7000:6379
redis-node-0:
redis-node-0: &redis-node
image: docker.io/bitnami/redis-cluster:7.2
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 3
start_period: 10s

redis-node-1:
image: docker.io/bitnami/redis-cluster:7.2
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
<<: *redis-node

redis-node-2:
image: docker.io/bitnami/redis-cluster:7.2
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
<<: *redis-node

redis-node-3:
image: docker.io/bitnami/redis-cluster:7.2
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
<<: *redis-node

redis-node-4:
image: docker.io/bitnami/redis-cluster:7.2
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
<<: *redis-node

redis-node-5:
image: docker.io/bitnami/redis-cluster:7.2
Expand All @@ -56,5 +50,38 @@ services:
REDIS_NODES: "redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5"
REDIS_CLUSTER_REPLICAS: 1
REDIS_CLUSTER_CREATOR: "yes"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 3
start_period: 10s
ports:
- 7001:6379

redis-master:
image: bitnami/redis:6.2.5
environment:
ALLOW_EMPTY_PASSWORD: "yes"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 3
start_period: 10s

redis-sentinel:
image: bitnami/redis-sentinel:latest
depends_on:
- redis-master
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_MASTER_HOST: "redis-master"
healthcheck:
test: ["CMD", "redis-cli", "-p", "26379", "ping"]
interval: 5s
timeout: 5s
retries: 3
start_period: 10s
ports:
- 7002:26379
772 changes: 389 additions & 383 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "taskiq-redis"
version = "0.5.6"
version = "1.0.0"
description = "Redis integration for taskiq"
authors = ["taskiq-team <[email protected]>"]
readme = "README.md"
Expand All @@ -26,7 +26,7 @@ keywords = [

[tool.poetry.dependencies]
python = "^3.8.1"
taskiq = ">=0.10.3,<1"
taskiq = ">=0.11.1,<1"
redis = "^5"

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

[tool.mypy]
strict = true
Expand Down
10 changes: 10 additions & 0 deletions taskiq_redis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,30 @@
from taskiq_redis.redis_backend import (
RedisAsyncClusterResultBackend,
RedisAsyncResultBackend,
RedisAsyncSentinelResultBackend,
)
from taskiq_redis.redis_broker import ListQueueBroker, PubSubBroker
from taskiq_redis.redis_cluster_broker import ListQueueClusterBroker
from taskiq_redis.redis_sentinel_broker import (
ListQueueSentinelBroker,
PubSubSentinelBroker,
)
from taskiq_redis.schedule_source import (
RedisClusterScheduleSource,
RedisScheduleSource,
RedisSentinelScheduleSource,
)

__all__ = [
"RedisAsyncClusterResultBackend",
"RedisAsyncResultBackend",
"RedisAsyncSentinelResultBackend",
"ListQueueBroker",
"PubSubBroker",
"ListQueueClusterBroker",
"ListQueueSentinelBroker",
"PubSubSentinelBroker",
"RedisScheduleSource",
"RedisClusterScheduleSource",
"RedisSentinelScheduleSource",
]
Loading

0 comments on commit e9b83fd

Please sign in to comment.