Skip to content

Commit ed222ed

Browse files
Merge remote-tracking branch 'origin/main' into COPDS-1737
2 parents 06f5b11 + c055b31 commit ed222ed

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cads_worker/worker.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def submit_workflow(
166166
config: dict[str, Any] = {},
167167
form: dict[str, Any] = {},
168168
metadata: dict[str, Any] = {},
169-
) -> int:
169+
):
170170
import cads_adaptors
171171

172172
job_id = distributed.worker.thread_state.key # type: ignore
@@ -204,7 +204,11 @@ def submit_workflow(
204204
raise
205205
finally:
206206
os.chdir(cwd)
207-
208207
fs, _ = cacholote.utils.get_cache_files_fs_dirname()
209208
fs.chmod(result.result["args"][0]["file:local_path"], acl="public-read")
210-
return result.id # type: ignore
209+
with context.session_maker() as session:
210+
request = cads_broker.database.set_request_cache_id(
211+
request_uid=job_id,
212+
cache_id=result.id,
213+
session=session,
214+
)

0 commit comments

Comments
 (0)