import devplacepy_services.base.bootstrap from devplacepy.routers import pubsub from devplacepy.services.live_view_relay import LiveViewRelayService from devplacepy.services.notification_relay import NotificationRelayService from devplacepy.services.presence_relay import PresenceRelayService from devplacepy.services.pubsub import PubSubService from devplacepy_services.base.service import BaseMicroservice, build_standard_app class PubsubService(BaseMicroservice): name = "pubsub" title = "PubSub" default_port = 10602 workers = 1 stateful = True depends_on = ["database"] managed_services = [ PubSubService(), PresenceRelayService(), NotificationRelayService(), LiveViewRelayService(), ] run_supervisor = True def build_app(self): return build_standard_app(self, routers=[(pubsub.router, "/pubsub")]) _service = PubsubService() app = _service.build_app()