address minor review comments

This commit is contained in:
Christian Schwarz
2023-02-06 16:13:11 +01:00
parent 2d835f059d
commit 183e97efb1
2 changed files with 7 additions and 2 deletions

View File

@@ -4,4 +4,4 @@ export PGHOST=ep-....eu-central-1.aws.neon.tech
export PGDATABASE=scraper-staging
export SCRAPE_ENDPOINT=http://localhost:9898
export SCRAPE_ENVIRONMENT=staging
export SCRAPE_INTERVAL=99
export SCRAPE_INTERVAL_SECS=99

View File

@@ -125,6 +125,11 @@ async def timeline_task(
async def resolve_what(what: List[str], client: Client):
"""
Resolve the list of "what" arguments on the command line to (tenant,timeline) tuples.
Format of a `what` argument: ALL | $tenant_id $tenant_id:$timeline_id
Examples:
- `ALL`: all timelines present on the pageserver
- `3ff96c2a04c3490285cba2019e69fb51`: all timelines of tenant `3ff96c2a04c3490285cba2019e69fb51` on the pageserver
- `3ff96c2a04c3490285cba2019e69fb51:604094d9de4bda14dfc8da3c1a73e0e4`: timeline `604094d9de4bda14dfc8da3c1a73e0e4` of tenant `3ff96c2a04c3490285cba2019e69fb51` on the pageserver
"""
tenant_and_timline_ids: Set[Tuple[str, str]] = set()
# fill tenant_and_timline_ids based on spec
@@ -226,7 +231,7 @@ if __name__ == "__main__":
)
envarg("--endpoint", "SCRAPE_ENDPOINT", help="where to write report output (default: stdout)")
envarg("--environment", "SCRAPE_ENVIRONMENT", help="environment of the pageserver")
envarg("--interval", "SCRAPE_INTERVAL", type=int)
envarg("--interval", "SCRAPE_INTERVAL_SECS", type=int)
envarg("--pg-host", "PGHOST")
envarg("--pg-user", "PGUSER")
envarg("--pg-password", "PGPASSWORD")