tacker.service module¶
- class tacker.service.Service(host, binary, topic, manager, report_interval=None, periodic_interval=None, periodic_fuzzy_delay=None, *args, **kwargs)¶
Bases:
ServiceService object for binaries running on hosts.
A service takes a manager and enables rpc by listening to queues based on topic. It also periodically runs tasks on the manager.
- classmethod create(host=None, binary=None, topic=None, manager=None, report_interval=None, periodic_interval=None, periodic_fuzzy_delay=None)¶
Instantiates class and passes back application object.
- Parameters:
host – defaults to cfg.CONF.host
binary – defaults to basename of executable
topic – defaults to bin_name - ‘tacker-’ part
manager – defaults to cfg.CONF.<topic>_manager
report_interval – defaults to cfg.CONF.report_interval
periodic_interval – defaults to cfg.CONF.periodic_interval
periodic_fuzzy_delay – defaults to cfg.CONF.periodic_fuzzy_delay
- kill()¶
Destroy the service object.
- periodic_tasks(raise_on_error=False)¶
Tasks to be run at a periodic interval.
- report_state()¶
Update the state of this service.
- reset()¶
Reset a service in case it received a SIGHUP.
- start()¶
Start a service.
- stop()¶
Stop a service.
- Parameters:
graceful – indicates whether to wait for all threads to finish or terminate them instantly
- wait()¶
Wait for a service to shut down.
- tacker.service.config_opts()¶