Skip to content

Commit

Permalink
Merge pull request #409 from JaGeo/fix_storage_issue
Browse files Browse the repository at this point in the history
Fix issue with data store
  • Loading branch information
utf authored Aug 31, 2023
2 parents 94a4984 + ba0e98e commit 1ac9023
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/jobflow/core/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@ def prepare_replace(
store_output_job.index = current_job.index + 1
store_output_job.metadata = current_job.metadata
store_output_job.output_schema = current_job.output_schema
store_output_job._kwargs = current_job._kwargs
replace.add_jobs(store_output_job)

elif isinstance(replace, Job):
Expand Down
3 changes: 2 additions & 1 deletion tests/core/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def replace_list_flow():
assert j.hosts == [response.replace.uuid]

# replace with flow with outputs
test_job = Job(replace_flow, metadata=metadata, output_schema="123")
test_job = Job(replace_flow, metadata=metadata, output_schema="123", data=True)
# wrap the job in a Flow to check hosts
test_flow = Flow([test_job])
response = test_job.run(memory_jobstore)
Expand All @@ -188,6 +188,7 @@ def replace_list_flow():
assert response.replace.jobs[-1].uuid == test_job.uuid
assert response.replace.jobs[-1].metadata == metadata
assert response.replace.jobs[-1].output_schema == "123"
assert response.replace.jobs[-1]._kwargs["data"]
assert response.replace.output is not None
for j in response.replace.jobs:
assert j.hosts == [response.replace.uuid, test_flow.uuid]
Expand Down

0 comments on commit 1ac9023

Please sign in to comment.