]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔨 Update FastAPI People sleep interval, use external settings (#13888)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 12 Jul 2025 19:09:49 +0000 (21:09 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Jul 2025 19:09:49 +0000 (19:09 +0000)
.github/workflows/people.yml
scripts/people.py

index 11931a05a033e4306a769244ecf95ee001b8298a..c1df3455e5469cbc7806f0571590c798fb48685c 100644 (file)
@@ -51,3 +51,4 @@ jobs:
         run: python ./scripts/people.py
         env:
           GITHUB_TOKEN: ${{ secrets.FASTAPI_PEOPLE }}
+          SLEEP_INTERVAL: ${{ vars.PEOPLE_SLEEP_INTERVAL }}
index f61fd31c9f086c77fcac5453391dfb6718cac28c..7418b459561c19885015d08e15ec9540f75b7c7b 100644 (file)
@@ -119,6 +119,7 @@ class Settings(BaseSettings):
     github_token: SecretStr
     github_repository: str
     httpx_timeout: int = 30
+    sleep_interval: int = 5
 
 
 def get_graphql_response(
@@ -184,7 +185,7 @@ def get_discussion_nodes(settings: Settings) -> list[DiscussionsNode]:
             discussion_nodes.append(discussion_edge.node)
         last_edge = discussion_edges[-1]
         # Handle GitHub secondary rate limits, requests per minute
-        time.sleep(5)
+        time.sleep(settings.sleep_interval)
         discussion_edges = get_graphql_question_discussion_edges(
             settings=settings, after=last_edge.cursor
         )