Skip to content

Commit 18b1d71

Browse files
authored
Merge pull request #879 from RS-PYTHON/staging-process-execute-signature
Staging: use pygeoapi processor signature
2 parents ba6804c + 9c49d2a commit 18b1d71

File tree

5 files changed

+301
-290
lines changed

5 files changed

+301
-290
lines changed

services/common/rs_server_common/s3_storage_handler/s3_storage_handler.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ class CustomSessionRedirect(requests.Session):
112112
"""
113113

114114
def __init__(self, trusted_domains=list[str] | None):
115-
"""Initialize the CustomSession instance."""
115+
"""
116+
Initialize the CustomSession instance.
117+
118+
Args:
119+
trusted_domains (list): List of allowed hosts for redirection in case of change of protocol (HTTP <> HTTPS).
120+
"""
116121
super().__init__()
117122
self.trusted_domains: list[str] = trusted_domains or [] # List of allowed hosts for redirection
118123

@@ -871,6 +876,7 @@ def s3_streaming_upload( # pylint: disable=too-many-locals
871876
872877
Args:
873878
stream_url (str): The URL of the file to be streamed and uploaded.
879+
trusted_domains (list): List of allowed hosts for redirection in case of change of protocol (HTTP <> HTTPS).
874880
auth (Any): Authentication credentials for the HTTP request (if required).
875881
bucket (str): The name of the target S3 bucket.
876882
key (str): The S3 object key (file path) to store the streamed file.

services/staging/rs_server_staging/main.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,12 @@ async def execute_process(req: Request, resource: str, data: ProcessMetadataMode
269269
processor_name = api.config["resources"][resource]["processor"]["name"]
270270
if processor_name in processors:
271271
processor = processors[processor_name]
272-
status = await processor(
272+
_, status = await processor(
273273
req,
274-
data.inputs.items,
275-
data.inputs.collection.id,
276274
data.outputs["result"].id,
277275
app.extra["process_manager"],
278276
app.extra["dask_cluster"],
279-
).execute()
277+
).execute(data.inputs.dict())
280278
return JSONResponse(status_code=HTTP_200_OK, content={"status": status})
281279

282280
raise HTTPException(status_code=HTTP_404_NOT_FOUND, detail=f"Processor '{processor_name}' not found")

0 commit comments

Comments
 (0)