@@ -130,7 +130,7 @@ async def _get_previous_time_schedules(self) -> list[bytes]:
130
130
if key_time and key_time <= minute_before :
131
131
time_keys .append (key .decode ())
132
132
for key in time_keys :
133
- schedules .extend (await redis .lrange (key , 0 , - 1 )) # type: ignore
133
+ schedules .extend (await redis .lrange (key , 0 , - 1 ))
134
134
135
135
return schedules
136
136
@@ -146,10 +146,10 @@ async def delete_schedule(self, schedule_id: str) -> None:
146
146
)
147
147
# We need to remove the schedule from the cron or time list.
148
148
if schedule .cron is not None :
149
- await redis .lrem (self ._get_cron_key (), 0 , schedule_id ) # type: ignore
149
+ await redis .lrem (self ._get_cron_key (), 0 , schedule_id )
150
150
elif schedule .time is not None :
151
151
time_key = self ._get_time_key (schedule .time )
152
- await redis .lrem (time_key , 0 , schedule_id ) # type: ignore
152
+ await redis .lrem (time_key , 0 , schedule_id )
153
153
154
154
async def add_schedule (self , schedule : "ScheduledTask" ) -> None :
155
155
"""Add a schedule to the source."""
@@ -163,9 +163,9 @@ async def add_schedule(self, schedule: "ScheduledTask") -> None:
163
163
# This is an optimization, so we can get all the schedules
164
164
# for the current time much faster.
165
165
if schedule .cron is not None :
166
- await redis .rpush (self ._get_cron_key (), schedule .schedule_id ) # type: ignore
166
+ await redis .rpush (self ._get_cron_key (), schedule .schedule_id )
167
167
elif schedule .time is not None :
168
- await redis .rpush ( # type: ignore
168
+ await redis .rpush (
169
169
self ._get_time_key (schedule .time ),
170
170
schedule .schedule_id ,
171
171
)
@@ -195,11 +195,11 @@ async def get_schedules(self) -> List["ScheduledTask"]:
195
195
self ._is_first_run = False
196
196
async with Redis (connection_pool = self ._connection_pool ) as redis :
197
197
buffer = []
198
- crons = await redis .lrange (self ._get_cron_key (), 0 , - 1 ) # type: ignore
198
+ crons = await redis .lrange (self ._get_cron_key (), 0 , - 1 )
199
199
logger .debug ("Got %d cron schedules" , len (crons ))
200
200
if crons :
201
201
buffer .extend (crons )
202
- timed .extend (await redis .lrange (self ._get_time_key (current_time ), 0 , - 1 )) # type: ignore
202
+ timed .extend (await redis .lrange (self ._get_time_key (current_time ), 0 , - 1 ))
203
203
logger .debug ("Got %d timed schedules" , len (timed ))
204
204
if timed :
205
205
buffer .extend (timed )
0 commit comments