ConsumerService
(worker_id, conf)[source]¶Bases: cotyledon._service.Service
run
()[source]¶Method representing the service activity
If not implemented the process will just wait to receive an ending signal.
This method is ran into the thread and can block or return as needed
Any exceptions raised by this method will be logged and the worker will exit with status 1.
terminate
()[source]¶Gracefully shutdown the service
This method will be executed when the Service has to shutdown cleanly.
If not implemented the process will just end with status 0.
To customize the exit code, the SystemExit
exception can be
used.
Any exceptions raised by this method will be logged and the worker will exit with status 1.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.