apps.worker

Worker command-line program.

This module is the ‘program-version’ of celery.worker.

It does everything necessary to run that module as an actual application, like installing signal handlers, platform tweaks, and so on.

Module Contents

Classes

Worker() Worker as a program.

Functions

active_thread_count()
safe_say(msg)
_shutdown_handler(worker,sig=”TERM”,how=”Warm”,exc=WorkerShutdown,callback=None,exitcode=EX_OK)
on_SIGINT(worker)
install_worker_int_handler(*args,**kwargs)
_reload_current_worker()
install_worker_restart_handler(worker,sig=”SIGHUP”)
install_cry_handler(sig=”SIGUSR1”)
install_rdb_handler(envvar=”CELERY_RDBSIG”,sig=”SIGUSR2”)
install_HUP_not_supported_handler(worker,sig=”SIGHUP”)
active_thread_count()
safe_say(msg)
class Worker

Worker as a program.

on_before_init(quiet=False, **kwargs)
on_after_init(purge=False, no_color=None, redirect_stdouts=None, redirect_stdouts_level=None, **kwargs)
on_init_blueprint()
on_start()
emit_banner()
on_consumer_ready(consumer)
setup_logging(colorize=None)
purge_messages()
tasklist(include_builtins=True,sep="

“,int_=”celery.”)

extra_info()
startup_info(artlines=True)
install_platform_tweaks(worker)

Install platform specific tweaks and workarounds.

macOS_proxy_detection_workaround()

See https://github.com/celery/celery/issues#issue/161.

set_process_status(info)
_shutdown_handler(worker, sig="TERM", how="Warm", exc=WorkerShutdown, callback=None, exitcode=EX_OK)
on_SIGINT(worker)
install_worker_int_handler(*args, **kwargs)
_reload_current_worker()
install_worker_restart_handler(worker, sig="SIGHUP")
install_cry_handler(sig="SIGUSR1")
install_rdb_handler(envvar="CELERY_RDBSIG", sig="SIGUSR2")
install_HUP_not_supported_handler(worker, sig="SIGHUP")