retry是用来实现重试的

from retry import retry

@retry(tries=5, delay=2)
def do_something():
xxx

do_something()