Skip to content

Commit

Permalink
self
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Mar 8, 2024
1 parent c75bcde commit 77bc6e3
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,14 @@ class SyncStatus(Enum):

@staticmethod
def from_stale_status(stale_status: StaleStatus) -> "SyncStatus":
return SyncStatus.SYNCED if stale_status == StaleStatus.FRESH else SyncStatus.UNSYNCED

"""Convert a StaleStatus to a SyncStatus.
# class UnsyncedCauseCategoroy(Enum):
# CODE = "CODE"
# DATA = "DATA"
# DEPENDENCIES = "DEPENDENCIES"
While this appears to lose information, we are redefining stale to unsynced and it is
a binary state, so this reflects that.
# class UnsyncedCause(NamedTuple):
# asset_partition: AssetPartition
# category: UnsyncedCauseCategoroy
# reason: str
# dependency: Optional[AssetPartition]
One will still be able to know why a partition is unsynced by looking at the causes API.
"""
return SyncStatus.SYNCED if stale_status == StaleStatus.FRESH else SyncStatus.UNSYNCED


class AssetSlice:
Expand Down

0 comments on commit 77bc6e3

Please sign in to comment.