Syndication: enforce DZone Friday-only rule and prune stale queue tasks#5245
Open
shai-almog wants to merge 1 commit into
Open
Syndication: enforce DZone Friday-only rule and prune stale queue tasks#5245shai-almog wants to merge 1 commit into
shai-almog wants to merge 1 commit into
Conversation
DZone (like Foojay) should only receive the weekly Friday digest post, but queue_browser_syndication.py queued every eligible post, so Monday's modern-advertising-api was submitted to DZone moderation. Two-part fix: - Filter at enqueue time: WEEKLY_FRIDAY_PLATFORMS gates which posts a Friday-only platform accepts (post.date.weekday() == 4), mirroring FoojayAdapter.accepts. - Prune at queue time: each run now drops already-queued tasks that the rules no longer allow. The browser drain tool submits whatever sits in the queue, so enqueue-time filtering alone could not stop a task that was queued before the filter existed (or added by hand). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
DZone (like Foojay) is supposed to receive only the weekly Friday digest post. But
queue_browser_syndication.pyqueued every eligible post, so Monday'smodern-advertising-apiwas queued for DZone and the browser drain tool submitted it to moderation.The earlier Friday-only edit also never actually took effect, for two reasons:
Fix (two layers)
WEEKLY_FRIDAY_PLATFORMSgates which posts a Friday-only platform accepts (post.date.weekday() == 4), mirroringFoojayAdapter.accepts.Testing
dzone:task → pruned;medium:→ kept; Fridaydzone:→ kept; unknown slug → kept.py_compileclean.🤖 Generated with Claude Code