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
cancel()[исходный код]
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)[исходный код]

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
Schedule

alias of Timer

call_after(*args, **kwargs)[исходный код]
call_at(*args, **kwargs)[исходный код]
call_repeatedly(*args, **kwargs)[исходный код]
cancel(tref)[исходный код]
clear()[исходный код]
empty()[исходный код]
ensure_started()[исходный код]
enter(entry, eta, priority=None)[исходный код]
enter_after(*args, **kwargs)[исходный код]
exit_after(secs, priority=10)[исходный код]
next()
on_tick = None
property queue
run()[исходный код]

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
stop()[исходный код]
celery.utils.timer2.to_timestamp(d, default_timezone=zoneinfo.ZoneInfo(key='UTC'), time=<built-in function monotonic>)[исходный код]

Convert datetime to timestamp.

If d“ is already a timestamp, then that will be used.

Back to Top