Merge pull request #436 from anmol098/fix/inter_api_commit_request_sleep

Sleep added between API commit request calls
This commit is contained in:
Anmol Singh
2023-03-22 08:46:17 +05:30
committed by GitHub

View File

@@ -1,3 +1,4 @@
from asyncio import sleep
from json import dumps from json import dumps
from re import search from re import search
from datetime import datetime from datetime import datetime
@@ -81,3 +82,6 @@ async def update_data_with_commit_stats(repo_details: Dict, yearly_data: Dict, d
yearly_data[curr_year][quarter][repo_details["primaryLanguage"]["name"]] = {"add": 0, "del": 0} yearly_data[curr_year][quarter][repo_details["primaryLanguage"]["name"]] = {"add": 0, "del": 0}
yearly_data[curr_year][quarter][repo_details["primaryLanguage"]["name"]]["add"] += commit["additions"] yearly_data[curr_year][quarter][repo_details["primaryLanguage"]["name"]]["add"] += commit["additions"]
yearly_data[curr_year][quarter][repo_details["primaryLanguage"]["name"]]["del"] += commit["deletions"] yearly_data[curr_year][quarter][repo_details["primaryLanguage"]["name"]]["del"] += commit["deletions"]
if not EM.DEBUG_RUN:
await sleep(0.4)