def might_crash(n):
    time.sleep(3 * random.random())
if random.randrange(3) == 0:
    raise Hell(n)
return '{0} done'.format(n)


class Hell(Exception):
    pass
if __name__ == '__main__':
    main()
How do I put a task back in the queue if the task fails?