def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable, max_seconds_idle: int,
                 end_notify: callable):
        """
        :param max_seconds_idle: Max seconds to wait for a new work to appear before ending the execution.
            If it is None, it behaves as a QueueWorker, waiting forever.
        """
        super().__init__(name, work_queue, error_handler)
        self.max_seconds_idle = max_seconds_idle
        self.end_notify = end_notify
def __init__ ( self , name : str , work_queue : queue . Queue , error_handler : callable , max_seconds_idle : int , end_notify : callable ) : super ( ) . __init__ ( name , work_queue , error_handler ) self . max_seconds_idle = max_seconds_idle self . end_notify = end_notify
:param max_seconds_idle: Max seconds to wait for a new work to appear before ending the execution.
            If it is None, it behaves as a QueueWorker, waiting forever.