We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 06f5b11 + c055b31 commit ed222edCopy full SHA for ed222ed
cads_worker/worker.py
@@ -166,7 +166,7 @@ def submit_workflow(
166
config: dict[str, Any] = {},
167
form: dict[str, Any] = {},
168
metadata: dict[str, Any] = {},
169
-) -> int:
+):
170
import cads_adaptors
171
172
job_id = distributed.worker.thread_state.key # type: ignore
@@ -204,7 +204,11 @@ def submit_workflow(
204
raise
205
finally:
206
os.chdir(cwd)
207
-
208
fs, _ = cacholote.utils.get_cache_files_fs_dirname()
209
fs.chmod(result.result["args"][0]["file:local_path"], acl="public-read")
210
- return result.id # type: ignore
+ with context.session_maker() as session:
+ 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