Skip to content

Commit 52b1670

Browse files
committed
Merge branch 'release/0.11.2'
2 parents b352cb4 + a35b086 commit 52b1670

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

docs/framework_integrations/taskiq-with-aiogram.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ bot = Bot(token="TOKEN")
6767
@dp.startup()
6868
async def setup_taskiq(bot: Bot, *_args, **_kwargs):
6969
# Here we check if it's a clien-side,
70-
# Becuase otherwise you're going to
70+
# Because otherwise you're going to
7171
# create infinite loop of startup events.
7272
if not broker.is_worker_process:
7373
logging.info("Setting up taskiq")

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 = "taskiq"
3-
version = "0.11.1"
3+
version = "0.11.2"
44
description = "Distributed task queue with full async support"
55
authors = ["Pavel Kirilin <[email protected]>"]
66
maintainers = ["Pavel Kirilin <[email protected]>"]

taskiq/cli/scheduler/run.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ async def run_scheduler_loop(scheduler: TaskiqScheduler) -> None:
144144
running_schedules = set()
145145
while True:
146146
# We use this method to correctly sleep for one minute.
147-
next_minute = datetime.now().replace(second=0, microsecond=0) + timedelta(
148-
minutes=1,
149-
)
150147
scheduled_tasks = await get_all_schedules(scheduler)
151148
for source, task_list in scheduled_tasks.items():
152149
for task in task_list:
@@ -165,7 +162,9 @@ async def run_scheduler_loop(scheduler: TaskiqScheduler) -> None:
165162
)
166163
running_schedules.add(send_task)
167164
send_task.add_done_callback(running_schedules.discard)
168-
165+
next_minute = datetime.now().replace(second=0, microsecond=0) + timedelta(
166+
minutes=1,
167+
)
169168
delay = next_minute - datetime.now()
170169
await asyncio.sleep(delay.total_seconds())
171170

0 commit comments

Comments
 (0)