def handler(signum, frame):
    print('Signal handler called with signal', signum)
raise IOError("Couldn't open device!")
signal.signal(signal.SIGALRM, handler)
как реализовать функцию тайм-аута redis pubsub?