fix(watcher): resume the bot backlog from a saved cursor instead of restarting it

This commit is contained in:
hh committed 2026-09-19 16:18:40 +00:00
1 parent 59d3f214e8
commit 468f72ed11
4 files changed
+156 -32

No files matched your search

@@ -0,0 +1,34 @@
"""bot backlog cursor
Revision ID: b6d1f4a82e57
Revises: a7f3d2b81c04
Create Date: 2026-09-19 10:00:00.000000
"""
from collections.abc import Sequence
from alembic import op
revision: str = "b6d1f4a82e57"
down_revision: str | None = "a7f3d2b81c04"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
op.execute(
"ALTER TABLE watched_bots "
"ADD COLUMN backfill_pts integer, "
"ADD COLUMN backfill_qts integer, "
"ADD COLUMN backfill_date integer"
)
def downgrade() -> None:
op.execute(
"ALTER TABLE watched_bots "
"DROP COLUMN IF EXISTS backfill_pts, "
"DROP COLUMN IF EXISTS backfill_qts, "
"DROP COLUMN IF EXISTS backfill_date"
)