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

django_celery_monitor.models

The data models for the task and worker states.

class django_celery_monitor.models.TaskState(*args, **kwargs)[source]

The data model to store the task state in.

exception DoesNotExist
exception MultipleObjectsReturned
args

The positional task arguments.

eta

An optional datetime describing the ETA for its processing.

expires

An optional datetime describing when the task expires.

hidden

Whether the task has been expired and will be purged by the event framework.

kwargs

The keyword task arguments.

name

The task name.

objects = <django.db.models.manager.ManagerFromTaskStateQuerySet object>

A TaskStateManager instance to query the TaskState model.

result

The result of the task.

retries

The number of retries.

runtime

The task runtime in seconds.

state

The task state as returned by Celery.

task_id

The task UUID.

traceback

The Python error traceback if raised.

tstamp

A datetime describing when the task was received.

worker

The worker responsible for the execution of the task.

class django_celery_monitor.models.WorkerState(*args, **kwargs)[source]

The data model to store the worker state in.

exception DoesNotExist
exception MultipleObjectsReturned
hostname

The hostname of the Celery worker.

is_alive()[source]

Return whether the worker is currently alive or not.

last_heartbeat

A datetime describing when the worker was last seen.

objects = <django.db.models.manager.ManagerFromWorkerStateQuerySet object>

A ExtendedManager instance to query the WorkerState model.