def receive_message(message): try: MESSAGING_GATEWAY.onReceiveAJAXMessage(message) except Exception as err: if DEBUG_MODE: raise else: logError(err, stack=traceback.format_exc())
def background_thread(): #@TODO: TEST AND MAKE SURE THIS workS WITH GUNICORN (if we use that) try: MESSAGING_GATEWAY.processQueuedMessages() except Exception as err: if DEBUG_MODE: raise else: logError(err, stack=traceback.format_exc()) MESSAGING_GATEWAY.processQueuedMessages()