Skip to content

Commit

Permalink
Expose deadline argument for DAG (#678)
Browse files Browse the repository at this point in the history
* Expose deadline argument for DAG

* Use 86400 as default instead of None

---------

Co-authored-by: Sean Gillies <[email protected]>
  • Loading branch information
ktsitsi and sgillies authored Nov 15, 2024
1 parent 58004c0 commit 9817329
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tiledb/cloud/bioimg/ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def ingest(
converter: Optional[str] = None,
output_ext: str = "",
tile_scale: int = 128,
timeout: Optional[int] = 86400,
**kwargs,
) -> tiledb.cloud.dag.DAG:
"""The function ingests microscopy images into TileDB arrays
Expand Down Expand Up @@ -87,6 +88,8 @@ def ingest(
resolution
:param reader: The selected reader backend implementation either "experimental"
or "production". Default["production"]
:param timeout: Duration (sec) ingestion DAG allowed to execute before timeout.
The default is 86400 seconds (24 hours).
"""

logger = get_logger_wrapper(verbose)
Expand Down Expand Up @@ -348,6 +351,7 @@ def register_dataset_udf(
limit=3,
retry_policy="Always",
),
deadline=timeout,
)

# The lister doesn't need many resources.
Expand Down

0 comments on commit 9817329

Please sign in to comment.