Change the maximum number of working threads to 1.

This commit is contained in:
NianBroken
2024-05-22 10:14:13 +08:00 Unverified
parent ed2a7adac4
commit f944669343
+1 -1
View File
@@ -30,7 +30,7 @@ class GitHubActionsManager:
else: # 如果删除失败 else: # 如果删除失败
print(f"Failed to delete run with ID {run_id}. Status code: {response.status_code}") # 打印错误信息 print(f"Failed to delete run with ID {run_id}. Status code: {response.status_code}") # 打印错误信息
def delete_old_runs(self, max_workers=2): def delete_old_runs(self, max_workers=1):
next_page = self.runs_url # 初始化下一页的URL为第一页 next_page = self.runs_url # 初始化下一页的URL为第一页
while next_page: # 循环直到没有下一页 while next_page: # 循环直到没有下一页
# 发送GET请求获取一页工作流运行记录 # 发送GET请求获取一页工作流运行记录