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

Timer - kombu.async.timer

Timer scheduling Python callbacks.

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

Schedule Entry.

args
cancel()[source]
canceled
cancelled
fun
kwargs
tref
class kombu.async.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
Timer.apply_entry(entry)[source]
Timer.call_after(secs, fun, args=(), kwargs={}, priority=0)[source]
Timer.call_at(eta, fun, args=(), kwargs={}, priority=0)[source]
Timer.call_repeatedly(secs, fun, args=(), kwargs={}, priority=0)[source]
Timer.cancel(tref)[source]
Timer.clear()[source]
Timer.enter_after(secs, entry, priority=0, time=<function _monotonic>)[source]
Timer.enter_at(entry, eta=None, priority=0, time=<function _monotonic>)[source]

Enter function into the scheduler.

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

Snapshot of underlying datastructure.

Timer.schedule
Timer.stop()[source]
kombu.async.timer.to_timestamp(d, default_timezone=<UTC>, time=<function _monotonic>)[source]

Convert datetime to timestamp.

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