fastprocesses 0.22.3__tar.gz → 0.22.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/PKG-INFO +2 -2
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/README.md +1 -1
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/pyproject.toml +1 -1
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/api/manager.py +11 -1
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/api/router.py +10 -6
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/AUTHORS.md +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/__init__.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/api/__init__.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/api/server.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/common.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/__init__.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/base_process.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/cache.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/config.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/exceptions.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/logging.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/models.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/output_protocol.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/output_schema_resolver.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/outputs_handler.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/redis_connection.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/types.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/processes/__init__.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/processes/process_registry.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/py.typed +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/static/style.css +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/templates/landing.html +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/worker/__init__.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/worker/celery_app.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/worker/chord_tasks.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/worker/executors.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/worker/job_status.py +0 -0
- {fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/worker/pipeline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastprocesses
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.4
|
|
4
4
|
Summary: A library to create a FastAPI-based OGC API Processes wrapper around existing projects.
|
|
5
5
|
License-File: AUTHORS.md
|
|
6
6
|
Author: Stefan Schuhart
|
|
@@ -39,7 +39,7 @@ A library to create a FastAPI-based OGC API Processes wrapper around existing pr
|
|
|
39
39
|
|
|
40
40
|
AI helped to create this code.
|
|
41
41
|
|
|
42
|
-
## Version: 0.22.
|
|
42
|
+
## Version: 0.22.4
|
|
43
43
|
|
|
44
44
|
### Description
|
|
45
45
|
|
|
@@ -79,7 +79,7 @@ exclude = [
|
|
|
79
79
|
|
|
80
80
|
[tool.poetry]
|
|
81
81
|
name = "fastprocesses"
|
|
82
|
-
version = "0.22.
|
|
82
|
+
version = "0.22.4"
|
|
83
83
|
description = "A library to create a FastAPI-based OGC API Processes wrapper around existing projects."
|
|
84
84
|
authors = ["Stefan Schuhart <stefan.schuhart@gv.hamburg.de>"]
|
|
85
85
|
readme = "README.md"
|
|
@@ -508,7 +508,17 @@ class ProcessManager:
|
|
|
508
508
|
# Avoids jsonable_encoder + model_dump + json.dumps — up to 4 full
|
|
509
509
|
# Python-level passes through the input data — before returning 201.
|
|
510
510
|
# Cache lookup is handled by the worker (see find_result_in_cache).
|
|
511
|
-
|
|
511
|
+
response = AsyncExecutionStrategy(self).execute_raw(process_id, raw_body)
|
|
512
|
+
if isinstance(response, ProcessExecResponse):
|
|
513
|
+
# Persist the original requested outputs and response mode so
|
|
514
|
+
# GET /jobs/{job_id}/results can honour per-request format
|
|
515
|
+
# preferences rather than always returning every output.
|
|
516
|
+
request_meta = {
|
|
517
|
+
"outputs": data.model_dump(mode="json", include={"outputs"})["outputs"],
|
|
518
|
+
"response": data.response,
|
|
519
|
+
}
|
|
520
|
+
self.job_status_cache.put(f"job_request:{response.jobID}", request_meta)
|
|
521
|
+
return response
|
|
512
522
|
|
|
513
523
|
# Sync path: build CalculationTask for cache key and result retrieval.
|
|
514
524
|
# Sync execution is intended for fast/small jobs where this overhead is acceptable.
|
|
@@ -383,14 +383,18 @@ def get_router(
|
|
|
383
383
|
process = process_manager.process_registry.get_process(process_id)
|
|
384
384
|
result_class = _get_result_class(process)
|
|
385
385
|
if result_class is not None and isinstance(result, dict):
|
|
386
|
-
# Retrieve the original outputs
|
|
387
|
-
#
|
|
388
|
-
#
|
|
389
|
-
|
|
386
|
+
# Retrieve the original requested outputs and response mode
|
|
387
|
+
# that were stored when the job was submitted. Falls back
|
|
388
|
+
# to {} (all outputs, document mode) for legacy job records.
|
|
389
|
+
job_request = process_manager.job_status_cache.get(
|
|
390
|
+
f"job_request:{job_id}"
|
|
391
|
+
)
|
|
392
|
+
requested_outputs = (job_request or {}).get("outputs") or {}
|
|
393
|
+
response_mode = (job_request or {}).get("response") or "document"
|
|
390
394
|
return serialize_result(
|
|
391
395
|
result_class.model_validate(result),
|
|
392
|
-
|
|
393
|
-
|
|
396
|
+
requested_outputs,
|
|
397
|
+
response_mode,
|
|
394
398
|
process.process_description,
|
|
395
399
|
)
|
|
396
400
|
return JSONResponse(content=result)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/core/output_schema_resolver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastprocesses-0.22.3 → fastprocesses-0.22.4}/src/fastprocesses/processes/process_registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|