You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the content-state machine for posts. Enforce allowed transitions, fire post.transitioned hooks, and integrate the scheduled publisher (Asynq job that scans WHERE status='scheduled' AND publish_at <= now() every 30s).
Summary
Implement the content-state machine for posts. Enforce allowed transitions, fire
post.transitionedhooks, and integrate the scheduled publisher (Asynq job that scansWHERE status='scheduled' AND publish_at <= now()every 30s).Design reference
Acceptance criteria
internal/content/states.godefinesAllowedTransition(from, to Status) boolmatching §5.2Transition(ctx, id, to, by)validates the transition before UPDATEpost.transitionedhook fires with{from, to, post_id, user_id}payloadpublishedauto-draftposts older than 24htrashposts older than 30 daysDependencies
#22, #24
Complexity
M