mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-20 00:53:45 -04:00
🔨 Update FastAPI People sleep interval, use external settings (#13888)
This commit is contained in:
1 parent
313723494b
commit
ce26b8e1ca
2 files changed
+3
-1
No files matched your search
@@ -51,3 +51,4 @@ jobs:
|
||||
run: python ./scripts/people.py
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.FASTAPI_PEOPLE }}
|
||||
SLEEP_INTERVAL: ${{ vars.PEOPLE_SLEEP_INTERVAL }}
|
||||
+2
-1
@@ -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
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user