summaryrefslogtreecommitdiff
path: root/src/srht_contrib/models.py
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-11 22:48:38 -0500
committerChristian Cleberg <[email protected]>2026-04-11 22:48:38 -0500
commite27bbe17fd5d8f06fc3ccb4a8de97a0775a1439c (patch)
tree7ce854d65009decbe8631175f233f3b2c9df6373 /src/srht_contrib/models.py
parent533866679755bd6e7a97cfa0f050eaa832b0b373 (diff)
downloadhutch-stats-e27bbe17fd5d8f06fc3ccb4a8de97a0775a1439c.tar.gz
hutch-stats-e27bbe17fd5d8f06fc3ccb4a8de97a0775a1439c.tar.bz2
hutch-stats-e27bbe17fd5d8f06fc3ccb4a8de97a0775a1439c.zip
add durable actor queueing and staggered discovery imports
Diffstat (limited to 'src/srht_contrib/models.py')
-rw-r--r--src/srht_contrib/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/srht_contrib/models.py b/src/srht_contrib/models.py
index e0725ff..441b6ec 100644
--- a/src/srht_contrib/models.py
+++ b/src/srht_contrib/models.py
@@ -67,6 +67,11 @@ class TrackedActor(Base):
id: Mapped[int] = mapped_column(Integer, primary_key=True)
actor: Mapped[str] = mapped_column(String(255), nullable=False)
is_active: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
+ discovery_state: Mapped[str] = mapped_column(String(32), nullable=False, default="queued")
+ queued_for_discovery_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
+ next_poll_after: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
+ last_claimed_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
+ poll_attempts: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
last_requested_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
last_polled_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
last_poll_status: Mapped[str | None] = mapped_column(String(32), nullable=True)