def _message(status, content):
    """Send message interface.

    Parameters
    ----------
    status : str
        The type of message
    content : str

    """
    event = f'message.{status}'
    if flask.has_request_context():
        emit(event, dict(data=pack(content)))
    else:
        sio = flask.current_app.extensions['socketio']
        sio.emit(event, dict(data=pack(content)))
    eventlet.sleep()
def _message ( status , content ) : event = f'message.{status}' if flask . has_request_context ( ) : emit ( event , dict ( data = pack ( content ) ) ) else : sio = flask . current_app . extensions [ 'socketio' ] sio . emit ( event , dict ( data = pack ( content ) ) ) eventlet . sleep ( )
Send message interface.

    Parameters
    ----------
    status : str
        The type of message
    content : str