Instead of trying to pickle your WebSocketHandler instances you could store them in a class level (or just global) dictionary.
class MyHandler(WebSocketHandler):
connections = {}
def __init__(self, *args, **kwargs):
self.key = str(self)
self.connections[self.key] = self
Then you would pass the self.key along with the job to beanstalk, and when you get a job back you look up which connection to send the output to with the key, and then write to it. Something like (pseudo code...)
def beanstalk_listener():
for response in beanstalk.listen():
MyHandler.connections[response.data[:10]].write_message(response[10:])
I don't think there is any value in trying to persist your websockethandler connections in redis. They are by nature ephemeral. If your tornado process restarts/dies they have no use. If what you are trying to do is keep a record of which user is waiting for the output of which job then you'll need to keep track of that separately.