celery.utils.timer2
¶
Scheduler for Python functions.
备注
This is used for the thread-based worker only,
not for amqp/redis/sqs/qpid where kombu.asynchronous.timer
is used.
- class celery.utils.timer2.Entry(fun, args=None, kwargs=None)[源代码]¶
Schedule Entry.
- args¶
- canceled¶
- property cancelled¶
- fun¶
- kwargs¶
- tref¶
- class celery.utils.timer2.Timer(schedule: Timer | None = None, on_error: Callable[[Exception], None] | None = None, on_tick: Callable[[float], None] | None = None, on_start: Callable[[Timer], None] | None = None, max_interval: float | None = None, **kwargs: Any)[源代码]¶
Timer thread.
备注
This is only used for transports not supporting AsyncIO.
- class Entry(fun, args=None, kwargs=None)¶
Schedule Entry.
- args¶
- cancel()¶
- canceled¶
- property cancelled¶
- fun¶
- kwargs¶
- tref¶
- run() None [源代码]¶
Method representing the thread's activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object's constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.