Commit 0c351f10 authored by Matthias Weidenthaler's avatar Matthias Weidenthaler
Browse files

Changed env variable names

parent 9c35f0bb
......@@ -75,7 +75,7 @@ The function will return a successfull response as soon as the file content is s
A successfull response contains a task_id referring to the queued processing task. This can be used in [4. Query a L2 Processing Tasks State](#4-query-a-l2-processing-tasks-state) for querying a processing task's current state.
## Configuration
The helper will send HTTP requests to an external API. INGESTION_API_URL env variable should be set accordingly.
The helper will send HTTP requests to an external API. CSST_BACKEND_API_URL env variable should be set accordingly.
## Function: `submit_file_for_ingestion`
......@@ -103,7 +103,7 @@ def submit_file_for_ingestion(file_content: str, file_name: str) -> dict:
Query for file info by metadata values.
## Configuration
The helper will send HTTP requests to an external API. SEARCH_API_URL env variable should be set accordingly.
The helper will send HTTP requests to an external API. CSST_BACKEND_API_URL env variable should be set accordingly.
## Function: `search_with_basic_filters`
```python
......@@ -174,7 +174,7 @@ filter = {
Query the processing state of a processing task given a L2 task id.
## Configuration
The helper will send HTTP requests to an external API. QUERY_TASK_STATE_API_URL env variable should be set accordingly.
The helper will send HTTP requests to an external API. CSST_BACKEND_API_URL env variable should be set accordingly.
## Function: `query_processing_task_state`
```python
......@@ -200,7 +200,7 @@ def query_processing_task_state(
Query a star catalog by column values given a ra, dec and radius preselection.
## Configuration
The helper will send HTTP requests to an external API. STAR_CATALOG_SEARCH_API_URL env variable should be set accordingly.
The helper will send HTTP requests to an external API. CSST_BACKEND_API_URL env variable should be set accordingly.
## Function: `search_with_basic_filters`
```python
......
......@@ -26,9 +26,9 @@ def submit_file_for_ingestion(file_content: bytes, file_name: str) -> Dict[str,
Raises:
RuntimeError: If the ingestion API or OSS upload fails after retries.
"""
api_url = os.getenv("INGESTION_API_URL")
api_url = os.getenv("CSST_BACKEND_API_URL")
if not api_url:
raise RuntimeError("INGESTION_API_URL environment variable is not set")
raise RuntimeError("CSST_BACKEND_API_URL environment variable is not set")
# Step 1: Request an OSS upload path
request_upload_endpoint = f"{api_url}/datasync/level2/upload"
......@@ -98,9 +98,9 @@ def query_processing_task_state(task_id: str) -> Dict[str, Any]:
if not task_id:
raise ValueError("task_id must be provided")
api_url = os.getenv("QUERY_TASK_STATE_API_URL")
api_url = os.getenv("CSST_BACKEND_API_URL")
if not api_url:
raise RuntimeError("QUERY_TASK_STATE_API_URL environment variable is not set")
raise RuntimeError("CSST_BACKEND_API_URL environment variable is not set")
endpoint = f"{api_url}/datasync/level2/{task_id}"
......
......@@ -32,9 +32,9 @@ def query_metadata(
if not filter:
raise ValueError("Filter cannot be empty")
api_url = os.getenv("METADATA_SEARCH_API_URL")
api_url = os.getenv("CSST_BACKEND_API_URL")
if not api_url:
raise RuntimeError("METADATA_SEARCH_API_URL environment variable is not set")
raise RuntimeError("CSST_BACKEND_API_URL environment variable is not set")
endpoint = f"{api_url}/datasync/metadata/query"
......
......@@ -33,9 +33,9 @@ def query_star_catalog(
if not key:
raise ValueError("Key list cannot be empty")
api_url = os.getenv("STAR_CATALOG_SEARCH_API_URL")
api_url = os.getenv("CSST_BACKEND_API_URL")
if not api_url:
raise RuntimeError("STAR_CATALOG_SEARCH_API_URL environment variable is not set")
raise RuntimeError("CSST_BACKEND_API_URL environment variable is not set")
endpoint = f"{api_url}/starcatalog/query"
......
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