This document describes the current stable version of Kombu (4.5). For development docs, go here.

Timer - kombu.asynchronous.timer

Timer scheduling Python callbacks.

class kombu.asynchronous.timer.Entry(fun, args=None, kwargs=None)[source]

Schedule Entry.

args
cancel()[source]
canceled
cancelled
fun
kwargs
tref
class kombu.asynchronous.timer.Timer(max_interval=None, on_error=None, **kwargs)[source]

Async timer implementation.

class Entry(fun, args=None, kwargs=None)

Schedule Entry.

args
cancel()
canceled
cancelled
fun
kwargs
tref
apply_entry(entry)[source]
call_after(secs, fun, args=(), kwargs={}, priority=0)[source]
call_at(eta, fun, args=(), kwargs={}, priority=0)[source]
call_repeatedly(secs, fun, args=(), kwargs={}, priority=0)[source]
cancel(tref)[source]
clear()[source]
enter_after(secs, entry, priority=0, time=<built-in function monotonic>)[source]
enter_at(entry, eta=None, priority=0, time=<built-in function monotonic>)[source]

Enter function into the scheduler.

Parameters:
handle_error(exc_info)[source]
on_error = None
queue

Snapshot of underlying datastructure.

schedule
stop()[source]
kombu.asynchronous.timer.to_timestamp(d, default_timezone=<UTC>, time=<built-in function monotonic>)[source]

Convert datetime to timestamp.

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