Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from lsst.daf.butler.registry.interfaces import DatastoreRegistryBridge
from lsst.resources import ResourcePath, ResourcePathExpression

from . import SasquatchDispatcher
from . import SasquatchDispatcher, SasquatchDispatchFailure, SasquatchDispatchPartialFailure

if TYPE_CHECKING:
from lsst.daf.butler import Config, DatasetProvenance, DatasetType, LookupKey
Expand Down Expand Up @@ -155,7 +155,12 @@ def put(
self, inMemoryDataset: Any, ref: DatasetRef, *, provenance: DatasetProvenance | None = None
) -> None:
if self.constraints.isAcceptable(ref):
self._dispatcher.dispatchRef(inMemoryDataset, ref, extraFields=self.extra_fields)
try:
self._dispatcher.dispatchRef(inMemoryDataset, ref, extraFields=self.extra_fields)
except SasquatchDispatchFailure:
log.warning("Failed to dispatch metric bundle to Sasquatch.")
except SasquatchDispatchPartialFailure:
log.warning("Only some of the metrics were successfully dispatched to Sasquatch.")
else:
log.debug("Could not put dataset type %s with Sasquatch datastore", ref.datasetType)
raise DatasetTypeNotSupportedError(
Expand Down
Loading