From 526ae37a501256c22a5f73398b128c120c994b84 Mon Sep 17 00:00:00 2001 From: "Stephen C. Pope" Date: Wed, 9 Oct 2024 09:31:02 -0600 Subject: [PATCH] [Core-546] Expire event schedules and subscriptions (#12701) GitOrigin-RevId: bf1228f5ed4bf926bffac20065827327cc9e7912 --- README.md | 6 ++++++ descarteslabs/core/catalog/event_schedule.py | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d00bf8c7..3c520ec7 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ The documentation for the latest release can be found at [https://docs.descartes Changelog ========= +## Unreleased + +## Catalog + +- EventSchedule now has a read-only `expires` attribute which indicates when the schedule will be expired and deleted. + ## [3.2.0] - 2024-10-08 ### General diff --git a/descarteslabs/core/catalog/event_schedule.py b/descarteslabs/core/catalog/event_schedule.py index a935018d..cbcbea0f 100644 --- a/descarteslabs/core/catalog/event_schedule.py +++ b/descarteslabs/core/catalog/event_schedule.py @@ -154,7 +154,7 @@ class EventSchedule(CatalogObject): """, ) start_datetime = Timestamp( - doc="""str or datetime, optional: Timestamp when the schedule should be expired and deleted. + doc="""str or datetime, optional: Timestamp when the schedule should begin. *Filterable, sortable*. """ @@ -181,6 +181,13 @@ class EventSchedule(CatalogObject): *Filterable, sortable*. """, ) + expires = Timestamp( + doc="""str or datetime, readonly. Timestamp when the schedule will be expired and deleted. + Set automatically when the schedule is created or updated. + + *Filterable, sortable*. + """, + ) owners = ListAttribute( TypedAttribute(str), doc="""list(str), optional: User, group, or organization IDs that own this event schedule.