Skip to content

Commit 6cf72f3

Browse files
author
Alex Grosu
committed
Add stac browser for prip
1 parent f090380 commit 6cf72f3

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

services/frontend/.github/entrypoint_frontend.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ sb_urls=(${STAC_BROWSER_URLS//;/ })
2323
STAC_BROWSER_URL_ADGS=${sb_urls[0]}
2424
STAC_BROWSER_URL_CADIP=${sb_urls[1]}
2525
STAC_BROWSER_URL_CATALOG=${sb_urls[2]}
26+
STAC_BROWSER_URL_PRIP=${sb_urls[3]}
2627

2728
# Replace environment variables in the openapi.json file
2829
sed -i "s|\${RSPY_UAC_HOMEPAGE}|${RSPY_UAC_HOMEPAGE:-}|g" $RSPY_OPENAPI_FILE
2930
sed -i "s|\${STAC_BROWSER_URL_ADGS}|${STAC_BROWSER_URL_ADGS:-}|g" $RSPY_OPENAPI_FILE
3031
sed -i "s|\${STAC_BROWSER_URL_CADIP}|${STAC_BROWSER_URL_CADIP:-}|g" $RSPY_OPENAPI_FILE
3132
sed -i "s|\${STAC_BROWSER_URL_CATALOG}|${STAC_BROWSER_URL_CATALOG:-}|g" $RSPY_OPENAPI_FILE
33+
sed -i "s|\${STAC_BROWSER_URL_PRIP}|${STAC_BROWSER_URL_PRIP:-}|g" $RSPY_OPENAPI_FILE
3234

3335
# Run the FastAPI application
3436
python -m uvicorn --factory rs_server_frontend.main:start_app --host 0.0.0.0 --port 8000 "$@"

services/frontend/resources/build_aggregated_openapi.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ if [[ " $@ " == *" --run-services "* ]]; then
118118
# Use postgres database
119119
run_local_service "../adgs" "rs_server_adgs.fastapi.adgs_app:app" 8001 "health"
120120
run_local_service "../cadip" "rs_server_cadip.fastapi.cadip_app:app" 8002 "health"
121+
run_local_service "../prip" "rs_server_prip.fastapi.prip_app:app" 8005 "health"
121122
RSPY_LOCAL_MODE=1 \
122123
run_local_service "../staging" "rs_server_staging.main:app" 8004 "_mgmt/ping"
123124

services/frontend/resources/services.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ info:
3737
3838
<a href="${STAC_BROWSER_URL_ADGS}" target="_blank">ADGS</a> /
3939
<a href="${STAC_BROWSER_URL_CADIP}" target="_blank">CADIP</a> /
40+
<a href="${STAC_BROWSER_URL_PRIP}" target="_blank">PRIP</a> /
4041
<a href="${STAC_BROWSER_URL_CATALOG}" target="_blank">Catalog</a>
4142
4243
---
@@ -51,6 +52,11 @@ services:
5152
change_tags:
5253
"": CADIP stations
5354
Filter Extension: CADIP (Filter Extension)
55+
prip:
56+
openapi_url: http://localhost:8005/prip/api
57+
change_tags:
58+
"": PRIP stations
59+
Filter Extension: PRIP (Filter Extension)
5460
catalog:
5561
openapi_url: http://localhost:8003/catalog/api
5662
change_tags:

services/staging/rs_server_staging/processors/tasks.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,8 @@ def streaming_task( # pylint: disable=R0913, R0917
7272
Retry Mechanism:
7373
- Retries occur for network-related errors (`RequestException`) or S3 client errors
7474
(`ClientError`, `BotoCoreError`).
75-
- The function waits before retrying, with the delay time increasing exponentially
76-
(based on the `backoff_factor`).
77-
- The backoff formula is `backoff_factor * (2 ** (attempt - 1))`, allowing progressively
78-
longer wait times between retries.
75+
- The function waits S3_RETRY_TIMEOUT seconds before retrying
76+
- It keeps trying for S3_MAX_RETRIES times
7977
"""
8078

8179
logger_dask = logging.getLogger(__name__)
@@ -84,7 +82,6 @@ def streaming_task( # pylint: disable=R0913, R0917
8482
product_url = asset_info.product_url
8583
s3_file = asset_info.s3_file
8684
bucket = asset_info.s3_bucket
87-
# time.sleep(5)
8885
# get the retry timeout
8986
s3_retry_timeout = int(os.environ.get("S3_RETRY_TIMEOUT", S3_RETRY_TIMEOUT))
9087
# get the number of retries in case of failure

0 commit comments

Comments
 (0)