Fire tournament notifications when posts are published#4745
Fire tournament notifications when posts are published#4745SylvainChevalier wants to merge 2 commits into
Conversation
Tournament / project follower notifications previously fired when a question's open_time passed. With pre-predictions, questions are surfaced to users before forecasting opens (status = Upcoming), so notifications should fire at publish time instead. - Add `Question.published_at_triggered` to gate publish-time notifications - Cron job now fires `notify_project_subscriptions_post_open` once when the parent Post's `published_at` passes - Remove tournament notification from `handle_question_open` (still fires the post-level OPEN status change at open_time) - `notify_post_added_to_project` now uses the new flag Refs #4701 Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Preview EnvironmentYour preview environment is ready!
Details
ℹ️ Preview Environment InfoIsolation:
Limitations:
Cleanup:
|
|
@claude some unit tests are failing. |
|
Claude finished @SylvainChevalier's task in 3m 43s —— View job Task list
SummaryThe CI failure was not in the unit tests — they all passed (725 passed, 15 skipped). The failing step was "Check Ruff formatting" in the Backend Checks job: The offending block in the third test wrapped a notifications = Notification.objects.filter(
recipient=user2, type="post_status_change"
)
assert notifications.count() == 1Pushed as
|
Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
Closes #4701
Tournament / project follower notifications previously fired when a question's
open_timepassed. With pre-predictions, questions are surfaced to users before forecasting opens (status = Upcoming), so the notification should fire at publish time instead.Question.published_at_triggeredto gate publish-time notificationsjob_check_post_open_eventnow firesnotify_project_subscriptions_post_openonce when the parentPost.published_atpasseshandle_question_open(the post-level OPEN status change still fires atopen_time)notify_post_added_to_projectnow uses the new flagGenerated with Claude Code