Commit ac09dcfb authored by Matthias Weidenthaler's avatar Matthias Weidenthaler
Browse files

Fixed error string, fixed example catalog name

parent 936d1a1c
...@@ -11,7 +11,7 @@ def query_star_catalog( ...@@ -11,7 +11,7 @@ def query_star_catalog(
Query a star catalog by column values given a ra, dec and radius preselection. Query a star catalog by column values given a ra, dec and radius preselection.
Args: Args:
catalog_name: Name of the star catalog (e.g. msc_l1_mbi_catmix) catalog_name: Name of the star catalog (e.g. csst-msc-l1-mbi-catmix)
filter: The filter dict described below. filter: The filter dict described below.
The following keys MUST be set: The following keys MUST be set:
{ {
...@@ -28,7 +28,7 @@ def query_star_catalog( ...@@ -28,7 +28,7 @@ def query_star_catalog(
for required_key in ("ra", "dec", "radius"): for required_key in ("ra", "dec", "radius"):
if required_key not in filter or isinstance(filter[required_key], dict): if required_key not in filter or isinstance(filter[required_key], dict):
raise ValueError(f"Filter must contain scalar '{required_key}'") raise ValueError(f"Filter must contain scalar '{{{required_key}}}'")
if not key: if not key:
raise ValueError("Key list cannot be empty") raise ValueError("Key list cannot be empty")
......
...@@ -66,7 +66,7 @@ def start_ingestion_task(file_content: bytes, file_name: str) -> Dict[str, str]: ...@@ -66,7 +66,7 @@ def start_ingestion_task(file_content: bytes, file_name: str) -> Dict[str, str]:
print(f"OSS upload attempt {attempt} failed, retrying in {wait_time}s...") print(f"OSS upload attempt {attempt} failed, retrying in {wait_time}s...")
time.sleep(wait_time) time.sleep(wait_time)
# Step 3: Report upload completion # Step 3: Report upload completion, get task id
try: try:
report_upload_endpoint = f"{api_url}/datasync/level2/queue" report_upload_endpoint = f"{api_url}/datasync/level2/queue"
report_payload = {"bucket": oss_upload_bucket, "key": oss_upload_key, "fileName": file_name} report_payload = {"bucket": oss_upload_bucket, "key": oss_upload_key, "fileName": file_name}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment