@@ -60,9 +60,6 @@ class DatabaseClient(ogc_api_processes_fastapi.clients.BaseClient):
60
60
job_table : type [cads_broker .database .SystemRequest ] = attrs .field (
61
61
default = cads_broker .database .SystemRequest
62
62
)
63
- process_data_table : type [cads_catalogue .database .ResourceData ] = attrs .field (
64
- default = cads_catalogue .database .ResourceData
65
- )
66
63
67
64
def get_processes (
68
65
self ,
@@ -143,14 +140,12 @@ def get_process(
143
140
db_utils .ConnectionMode .read
144
141
)
145
142
with catalogue_sessionmaker () as catalogue_session :
146
- resource , resource_data = utils .lookup_resource_by_id (
143
+ resource = utils .lookup_resource_by_id (
147
144
resource_id = process_id ,
148
145
table = self .process_table ,
149
146
session = catalogue_session ,
150
147
)
151
- process_description = serializers .serialize_process_description (
152
- resource , resource_data
153
- )
148
+ process_description = serializers .serialize_process_description (resource )
154
149
process_description .outputs = {
155
150
"asset" : ogc_api_processes_fastapi .models .OutputDescription (
156
151
title = "Asset" ,
@@ -204,18 +199,18 @@ def post_process_execution(
204
199
db_utils .ConnectionMode .read
205
200
)
206
201
with catalogue_sessionmaker () as catalogue_session :
207
- resource , resource_data = utils .lookup_resource_by_id (
202
+ resource : cads_catalogue . database . Resource = utils .lookup_resource_by_id (
208
203
resource_id = process_id ,
209
204
table = self .process_table ,
210
205
session = catalogue_session ,
211
206
)
212
- adaptor = adaptors .instantiate_adaptor (resource , resource_data )
207
+ adaptor = adaptors .instantiate_adaptor (resource )
213
208
licences = adaptor .get_licences (execution_content )
214
209
auth .validate_licences (execution_content , stored_accepted_licences , licences )
215
210
job_id = str (uuid .uuid4 ())
216
211
structlog .contextvars .bind_contextvars (job_id = job_id )
217
212
job_kwargs = adaptors .make_system_job_kwargs (
218
- resource , resource_data , execution_content , adaptor .resources
213
+ resource , execution_content , adaptor .resources
219
214
)
220
215
compute_sessionmaker = db_utils .get_compute_sessionmaker (
221
216
mode = db_utils .ConnectionMode .write
@@ -407,7 +402,7 @@ def get_job(
407
402
(form_data ,) = utils .get_resource_properties (
408
403
resource_id = job .process_id ,
409
404
properties = "form_data" ,
410
- table = self .process_data_table ,
405
+ table = self .process_table ,
411
406
session = catalogue_session ,
412
407
)
413
408
kwargs ["request" ] = {
0 commit comments