taskiq-redis 0.5.3__tar.gz → 0.5.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taskiq-redis
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: Redis integration for taskiq
5
5
  Home-page: https://github.com/taskiq-python/taskiq-redis
6
6
  Keywords: taskiq,tasks,distributed,async,redis,result_backend
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3 :: Only
17
17
  Classifier: Programming Language :: Python :: 3.8
18
18
  Requires-Dist: redis (>=5,<6)
19
- Requires-Dist: taskiq (>=0.10.1,<1)
19
+ Requires-Dist: taskiq (>=0.10.3,<1)
20
20
  Project-URL: Repository, https://github.com/taskiq-python/taskiq-redis
21
21
  Description-Content-Type: text/markdown
22
22
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "taskiq-redis"
3
- version = "0.5.3"
3
+ version = "0.5.4"
4
4
  description = "Redis integration for taskiq"
5
5
  authors = ["taskiq-team <taskiq@norely.com>"]
6
6
  readme = "README.md"
@@ -26,7 +26,7 @@ keywords = [
26
26
 
27
27
  [tool.poetry.dependencies]
28
28
  python = "^3.8.1"
29
- taskiq = ">=0.10.1,<1"
29
+ taskiq = ">=0.10.3,<1"
30
30
  redis = "^5"
31
31
 
32
32
  [tool.poetry.group.dev.dependencies]
@@ -1,9 +1,9 @@
1
- import dataclasses
2
1
  from typing import Any, List, Optional
3
2
 
4
3
  from redis.asyncio import ConnectionPool, Redis
5
4
  from taskiq import ScheduleSource
6
5
  from taskiq.abc.serializer import TaskiqSerializer
6
+ from taskiq.compat import model_dump, model_validate
7
7
  from taskiq.scheduler.scheduled_task import ScheduledTask
8
8
 
9
9
  from taskiq_redis.serializer import PickleSerializer
@@ -60,7 +60,7 @@ class RedisScheduleSource(ScheduleSource):
60
60
  async with Redis(connection_pool=self.connection_pool) as redis:
61
61
  await redis.set(
62
62
  f"{self.prefix}:{schedule.schedule_id}",
63
- self.serializer.dumpb(dataclasses.asdict(schedule)),
63
+ self.serializer.dumpb(model_dump(schedule)),
64
64
  )
65
65
 
66
66
  async def get_schedules(self) -> List[ScheduledTask]:
@@ -82,7 +82,7 @@ class RedisScheduleSource(ScheduleSource):
82
82
  if buffer:
83
83
  schedules.extend(await redis.mget(buffer))
84
84
  return [
85
- ScheduledTask(**self.serializer.loadb(schedule))
85
+ model_validate(ScheduledTask, self.serializer.loadb(schedule))
86
86
  for schedule in schedules
87
87
  if schedule
88
88
  ]
File without changes