2020年にAI方向が発火することができ、簡単なツールを使用します

ツール

執念

  • Pythonの再試行モジュール:FTP再接続例えば
  • ピップ粘り強さをインストール
import random
from tenacity import retry

@retry
def do_something_unreliable():
    if random.randint(0, 10) > 1:
        raise IOError("Broken sauce, everything is hosed!!!111one")
    else:
        return "Awesome sauce!"

print(do_something_unreliable())

おすすめ

転載: blog.csdn.net/weixin_32393347/article/details/104281669