async def server_func(websocket: websockets.WebSocketServerProtocol, _: str) -> None:
    '\n        Create a websockets handler that sends parameter values to a listener\n        every "interval" seconds.\n        '
    while True:
        try:
            try:
                meta = _get_metadata(*parameters)
            except ValueError:
                log.exception('Error getting parameters')
                break
            log.debug('sending.. to %r', websocket)
            (await websocket.send(json.dumps(meta)))
            (await asyncio.sleep(interval))
        except (CancelledError, websockets.exceptions.ConnectionClosed):
            log.debug('Got CancelledError or ConnectionClosed', exc_info=True)
            break
    log.debug('Closing websockets connection')
Create a websockets handler that sends parameter values to a listener
every "interval" seconds.
async def server_func(websocket: websockets.WebSocketServerProtocol, _: str) -> None:
    '\n        Create a websockets handler that sends parameter values to a listener\n        every "interval" seconds.\n        '
    while True:
        try:
            try:
                meta = _get_metadata(*parameters)
            except ValueError:
                log.exception('Error getting parameters')
                break
            log.debug('sending.. to %r', websocket)
            (await websocket.send(json.dumps(meta)))
            (await asyncio.sleep(interval))
        except (CancelledError, websockets.exceptions.ConnectionClosed):
            log.debug('Got CancelledError or ConnectionClosed', exc_info=True)
            break
    log.debug('Closing websockets connection')