(self, interval=None)
Monitor for remote schema changes and keep any local schemas alive on the bus
Monitor for remote schema changes and keep any local schemas alive on the bus
Monitor for remote schema changes and keep any local schemas alive on the bus
async def monitor(self, interval=None):
        """Monitor for remote schema changes and keep any local schemas alive on the bus"""
        interval = interval or self.max_age_seconds * 0.8
        try:
            while True:
                await asyncio.sleep(interval)
                # Keep alive our local schemas
                for api_name, schema in self.local_schemas.items():
                    await self.schema_transport.ping(
                        api_name, schema, ttl_seconds=self.max_age_seconds
                    )

                # Read the entire schema back from the bus
                await self.load_from_bus()
        except asyncio.CancelledError:
            return
async def monitor ( self , interval = None ) : interval = interval or self . max_age_seconds * 0.8 try : while True : await asyncio . sleep ( interval ) # Keep alive our local schemas for api_name , schema in self . local_schemas . items ( ) : await self . schema_transport . ping ( api_name , schema , ttl_seconds = self . max_age_seconds ) # Read the entire schema back from the bus await self . load_from_bus ( ) except asyncio . CancelledError : return