This document describes the current stable version of Celery (5.2). For development docs, go here.
celery.utils.timer2
¶
Scheduler for Python functions.
Note
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)[source]¶
Schedule Entry.
- args¶
- canceled¶
- property cancelled¶
- fun¶
- kwargs¶
- tref¶
- celery.utils.timer2.Schedule¶
alias of
Timer
- class celery.utils.timer2.Timer(schedule=None, on_error=None, on_tick=None, on_start=None, max_interval=None, **kwargs)[source]¶
Timer thread.
Note
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¶
- Schedule¶
alias of
Timer
- next()¶
- on_tick = None¶
- property queue¶
- run()[source]¶
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.
- running = False¶