From 14dcd63806c6830ca3b3b0c3c13667002253b5e5 Mon Sep 17 00:00:00 2001 From: Isaac Lin Date: Tue, 19 Apr 2022 15:08:16 +0800 Subject: [PATCH] Update timeout controls --- script.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script.py b/script.py index 5847dd3c..ac5908d5 100644 --- a/script.py +++ b/script.py @@ -4,7 +4,7 @@ @Author: Jiabao Lin @Date: 2020/1/31 """ -from github3 import login, session +from github3 import login from dotenv import load_dotenv from pymongo import MongoClient import os @@ -80,7 +80,9 @@ def run(self): def github_manager(): # GitHub connection github = login(token=os.getenv('GITHUB_TOKEN')) - github.session = session.GitHubSession(default_read_timeout=10, default_connect_timeout=10) + github.session.default_read_timeout = 20 + github.session.default_connect_timeout = 20 + repository = github.repository(owner='BlankerL', repository='DXY-COVID-19-Data') release = repository.create_release( tag_name='{tag_name}'.format(