Skip to content

Commit

Permalink
use cache in dispatch_app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Oct 3, 2024
1 parent 9cd429f commit 036e1ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def collect_chunk(workunit_ref: int | Path, chunk_dir: Path) -> None:
chunk_dir = chunk_dir.absolute()
zip_file_path = chunk_dir / f"{chunk_dir.name}.zip"

# TODO how to incorporate the cache_file parameter here, without "assuming" that it's in the parent directory?
workunit_definition = WorkunitDefinition.from_ref(workunit_ref, client=Bfabric.from_config())
workunit_id = workunit_definition.registration.workunit_id

Expand Down
4 changes: 3 additions & 1 deletion src/depiction_targeted_preproc/app_interface/dispatch_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def dispatch_job(self, resource: Resource, params: dict[str, Any]) -> Path:
@app.default
def dispatch_app(workunit_ref: int | Path, work_dir: Path) -> None:
client = Bfabric.from_config()
workunit_definition = WorkunitDefinition.from_ref(workunit_ref, client)
workunit_definition = WorkunitDefinition.from_ref(
workunit_ref, client, cache_file=work_dir / "workunit_definition.yml"
)
dispatcher = DispatchApp(client=client, config=config_msi_imzml(), out_dir=work_dir)
dispatcher.dispatch_workunit(definition=workunit_definition)

Expand Down

0 comments on commit 036e1ce

Please sign in to comment.