This document describes Celery 3.0. For development docs, go here.

celery.utils.timer2

timer2

Scheduler for Python functions.

class celery.utils.timer2.Entry(fun, args=None, kwargs=None)[source]
args
cancel()[source]
cancelled
fun
kwargs
tref
class celery.utils.timer2.Schedule(max_interval=None, on_error=None, **kwargs)[source]

ETA scheduler.

class Entry(fun, args=None, kwargs=None)
args
cancel()
cancelled
fun
kwargs
tref
Schedule.apply_after(msecs, fun, args=(), kwargs={}, priority=0)[source]
Schedule.apply_at(eta, fun, args=(), kwargs={}, priority=0)[source]
Schedule.apply_entry(entry)[source]
Schedule.apply_interval(msecs, fun, args=(), kwargs={}, priority=0)[source]
Schedule.cancel(tref)[source]
Schedule.clear()[source]
Schedule.empty()[source]

Is the schedule empty?

Schedule.enter(entry, eta=None, priority=0)[source]

Enter function into the scheduler.

Parameters:
  • entry – Item to enter.
  • eta – Scheduled time as a datetime.datetime object.
  • priority – Unused.
Schedule.enter_after(msecs, entry, priority=0, time=<built-in function time>)[source]
Schedule.handle_error(exc_info)[source]
Schedule.info()[source]
Schedule.on_error = None
Schedule.queue[source]

Snapshot of underlying datastructure.

Schedule.schedule[source]
Schedule.stop()[source]
class celery.utils.timer2.Timer(schedule=None, on_error=None, on_tick=None, max_interval=None, **kwargs)[source]
class Entry(fun, args=None, kwargs=None)
args
cancel()
cancelled
fun
kwargs
tref
class Timer.Schedule(max_interval=None, on_error=None, **kwargs)

ETA scheduler.

class Entry(fun, args=None, kwargs=None)
args
cancel()
cancelled
fun
kwargs
tref
Timer.Schedule.apply_after(msecs, fun, args=(), kwargs={}, priority=0)
Timer.Schedule.apply_at(eta, fun, args=(), kwargs={}, priority=0)
Timer.Schedule.apply_entry(entry)
Timer.Schedule.apply_interval(msecs, fun, args=(), kwargs={}, priority=0)
Timer.Schedule.cancel(tref)
Timer.Schedule.clear()
Timer.Schedule.empty()

Is the schedule empty?

Timer.Schedule.enter(entry, eta=None, priority=0)

Enter function into the scheduler.

Parameters:
  • entry – Item to enter.
  • eta – Scheduled time as a datetime.datetime object.
  • priority – Unused.
Timer.Schedule.enter_after(msecs, entry, priority=0, time=<built-in function time>)
Timer.Schedule.handle_error(exc_info)
Timer.Schedule.info()
Timer.Schedule.on_error = None
Timer.Schedule.queue

Snapshot of underlying datastructure.

Timer.Schedule.schedule
Timer.Schedule.stop()
Timer.apply_after(*args, **kwargs)[source]
Timer.apply_at(*args, **kwargs)[source]
Timer.apply_interval(*args, **kwargs)[source]
Timer.cancel(tref)[source]
Timer.clear()[source]
Timer.empty()[source]
Timer.ensure_started()[source]
Timer.enter(entry, eta, priority=None)[source]
Timer.enter_after(*args, **kwargs)[source]
Timer.exit_after(msecs, priority=10)[source]
Timer.next()
Timer.on_tick = None
Timer.queue[source]
Timer.run()[source]
Timer.running = False
Timer.stop()[source]
celery.utils.timer2.to_timestamp(d, default_timezone=tzfile('/usr/share/zoneinfo/UTC'))[source]

Previous topic

celery.utils.threads

Next topic

celery.utils.imports

This Page