@@ -65,9 +65,9 @@ class Function:
6565
6666@dataclass
6767class JobMetaInfo :
68- message_id : str | None
6968 job_id : str
70- score : int | None
69+ message_id : str | None = None
70+ score : int | None = None
7171
7272
7373def func (
@@ -234,8 +234,6 @@ def __init__(
234234 expires_extra_ms : int = expires_extra_ms ,
235235 timezone : Optional [timezone ] = None ,
236236 log_results : bool = True ,
237- max_consumer_inactivity : 'SecondsTimedelta' = 86400 ,
238- idle_consumer_poll_interval : 'SecondsTimedelta' = 60 ,
239237 ):
240238 self .functions : Dict [str , Union [Function , CronJob ]] = {f .name : f for f in map (func , functions )}
241239 if queue_name is None :
@@ -271,8 +269,6 @@ def __init__(
271269 self .keep_result_forever = keep_result_forever
272270 self .poll_delay_s = to_seconds (poll_delay )
273271 self .stream_block_s = to_seconds (stream_block )
274- self .max_consumer_inactivity_s = to_seconds (max_consumer_inactivity )
275- self .idle_consumer_poll_interval_s = to_seconds (idle_consumer_poll_interval )
276272 self .queue_read_limit = queue_read_limit or max (max_jobs * 5 , 100 )
277273 self ._queue_read_offset = 0
278274 self .max_tries = max_tries
@@ -519,7 +515,7 @@ async def _poll_iteration(self) -> None:
519515 self .queue_name , min = float ('-inf' ), start = self ._queue_read_offset , num = count , max = now
520516 )
521517
522- jobs = [JobMetaInfo (message_id = None , job_id = _id .decode ()) for _id in job_ids ]
518+ jobs = [JobMetaInfo (job_id = _id .decode ()) for _id in job_ids ]
523519 await self .start_jobs (jobs )
524520
525521 if self .allow_abort_jobs :
0 commit comments