celery.contrib.rdb
Remote Debugger.
Introduction
This is a remote debugger for Celery tasks running in multiprocessing pool workers. Inspired by a lost post on dzone.com.
Usage
from celery.contrib import rdb
from celery import task
@task()
def add(x, y):
result = x + y
rdb.set_trace()
return result
Environment Variables
- CELERY_RDB_HOST
CELERY_RDB_HOST
Hostname to bind to. Default is ‘127.0.0.1’ (only accessible from localhost).
- CELERY_RDB_PORT
CELERY_RDB_PORT
Base port to bind to. Default is 6899. The debugger will try to find an available port starting from the base port. The selected port will be logged by the worker.
- celery.contrib.rdb.set_trace(frame=None)
-
Set break-point at current location, or a specified frame.
- celery.contrib.rdb.debugger()
-
Return the current debugger instance, or create if none.
- classcelery.contrib.rdb.Rdb(host='127.0.0.1', port=6899, port_search_limit=100, port_skew=0, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)
-
Remote debugger.
Copyright © 2017-2026 Asif Saif Uddin, core team & contributors. All rights reserved.
Celery is licensed under The BSD License (3 Clause, also known as the new BSD license). The license is an OSI approved Open Source license and is GPL-compatible.
https://docs.celeryq.dev/en/stable/reference/celery.contrib.rdb.html