taskiq-redis 1.0.6__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/PKG-INFO +1 -1
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/pyproject.toml +1 -1
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/list_schedule_source.py +12 -1
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/schedule_source.py +7 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/LICENSE +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/README.md +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/__init__.py +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/exceptions.py +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/py.typed +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/redis_backend.py +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/redis_broker.py +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/redis_cluster_broker.py +0 -0
- {taskiq_redis-1.0.6 → taskiq_redis-1.0.7}/taskiq_redis/redis_sentinel_broker.py +0 -0
|
@@ -25,6 +25,17 @@ class ListRedisScheduleSource(ScheduleSource):
|
|
|
25
25
|
skip_past_schedules: bool = False,
|
|
26
26
|
**connection_kwargs: Any,
|
|
27
27
|
) -> None:
|
|
28
|
+
"""
|
|
29
|
+
Create a new schedule source.
|
|
30
|
+
|
|
31
|
+
:param url: Redis URL
|
|
32
|
+
:param prefix: Prefix for all the keys
|
|
33
|
+
:param max_connection_pool_size: Maximum size of the connection pool
|
|
34
|
+
:param serializer: Serializer to use for the schedules
|
|
35
|
+
:param buffer_size: Buffer size for getting schedules
|
|
36
|
+
:param skip_past_schedules: Skip schedules that are in the past.
|
|
37
|
+
:param connection_kwargs: Additional connection kwargs
|
|
38
|
+
"""
|
|
28
39
|
super().__init__()
|
|
29
40
|
self._prefix = prefix
|
|
30
41
|
self._buffer_size = buffer_size
|
|
@@ -179,7 +190,7 @@ class ListRedisScheduleSource(ScheduleSource):
|
|
|
179
190
|
current_time = datetime.datetime.now(datetime.timezone.utc)
|
|
180
191
|
timed: list[bytes] = []
|
|
181
192
|
# Only during first run, we need to get previous time schedules
|
|
182
|
-
if
|
|
193
|
+
if not self._skip_past_schedules:
|
|
183
194
|
timed = await self._get_previous_time_schedules()
|
|
184
195
|
self._is_first_run = False
|
|
185
196
|
async with Redis(connection_pool=self._connection_pool) as redis:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import sys
|
|
2
|
+
import warnings
|
|
2
3
|
from contextlib import asynccontextmanager
|
|
3
4
|
from typing import TYPE_CHECKING, Any, AsyncIterator, List, Optional, Tuple
|
|
4
5
|
|
|
@@ -53,6 +54,12 @@ class RedisScheduleSource(ScheduleSource):
|
|
|
53
54
|
serializer: Optional[TaskiqSerializer] = None,
|
|
54
55
|
**connection_kwargs: Any,
|
|
55
56
|
) -> None:
|
|
57
|
+
warnings.warn(
|
|
58
|
+
"RedisScheduleSource is deprecated. "
|
|
59
|
+
"Please switch to ListRedisScheduleSource",
|
|
60
|
+
DeprecationWarning,
|
|
61
|
+
stacklevel=2,
|
|
62
|
+
)
|
|
56
63
|
self.prefix = prefix
|
|
57
64
|
self.connection_pool: _BlockingConnectionPool = BlockingConnectionPool.from_url(
|
|
58
65
|
url=url,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|