Skip to content

Commit

Permalink
Add session control to prevent timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
BlankerL committed Apr 19, 2022
1 parent a279b24 commit 6c6fb00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@Author: Jiabao Lin
@Date: 2020/1/31
"""
from github3 import login
from github3 import login, session
from dotenv import load_dotenv
from pymongo import MongoClient
import os
Expand Down Expand Up @@ -80,6 +80,7 @@ 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)
repository = github.repository(owner='BlankerL', repository='DXY-COVID-19-Data')
release = repository.create_release(
tag_name='{tag_name}'.format(
Expand Down

0 comments on commit 6c6fb00

Please sign in to comment.