Multiprocessing connections and return codes

Hi,

I’ve setup listener and client functions used to populate a priority queue. Commands to be executed are submitted via a Flask app, to the Listener that drops them into a queue. The queue is monitored by a separate function that executes the submitted command.

I’d like to add some form of return code to the Listener so that the Client (and therefore Flask server) gets a response once the task has been successfully submitted to the priority queue.

If I use Try / Except block with a return XXX, my listener app will quit, rather than sitting there perpetually listening for a new connection.

Is there a way I can communicate a return code with the .Client without my function quitting?