你正在阅读 Celery 3.1 的文档。开发版本文档见: 此处.

celery.contrib.rdb

Remote debugger for Celery tasks running in multiprocessing pool workers. Inspired by http://snippets.dzone.com/posts/show/7248

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

Hostname to bind to. Default is ‘127.0.01’, which means the socket will only be accessible from the local host.

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 breakpoint at current location, or a specified frame

celery.contrib.rdb.debugger()[源代码]

Return the current debugger instance (if any), or creates a new one.

class celery.contrib.rdb.Rdb(host='127.0.0.1', port=6899, port_search_limit=100, port_skew=0, out=<open file '<stdout>', mode 'w' at 0x40482078>)[源代码]

上一个主题

celery.contrib.migrate

下一个主题

celery.contrib.methods

本页