Skip to content

simutils: service

Bryce George edited this page May 15, 2021 · 2 revisions

Author: ancient-sentinel - Last Updated: 5/6/2021

service Module

This module contains a helper class for registering and managing custom service modules.

Classes

class ServiceScope

This class provides a managed scope for a service registered within the context of an existing qi.Application.

  • create_scope() - A method which creates an instance of the service and registers it with the application session. It automatically calls the on_start() method of the service module if it is defined.

  • close_scope() - A methods which unregisters the service instance from the application session and disposes the instance. It automatically calls the on_stop() method of the service module if it is defined.

  • is_started() -> bool - A method which returns a value indicating whether a scope has been created and the service started.

 

Clone this wiki locally