Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unarchived episodes published #976

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Conversation

svevang
Copy link
Member

@svevang svevang commented Feb 28, 2024

Fixes the case where a fully delivered episode is unpublished and then republished but left in a remote DRAFTING state. In this case the default episodes_to_sync params were being calculated prior to the unarchiving of an episode. Since ARCHIVED episodes are not published, the main delivery routine was skipping these unarchived episodes.

@svevang svevang marked this pull request as ready for review February 28, 2024 16:58
@@ -106,20 +106,30 @@ def poll!(eps = episodes_to_sync)
end
end

def publish!(eps = episodes_to_sync)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this default parameter fixes up the caching of episode state. So when we un-archive the episode, the subsequent call to episodes_to_sync then freshly filters episode state (derived from the private feed).

poll_episodes!(episodes_to_archive)
archive!(episodes_to_archive)
show.reload
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These calls are only needed when episodes move from apple_new? == true to apple_new? == false. Or when an episode moves in and out of a private feed (which should not be happening during a publishing flow)

Copy link
Member

@kookster kookster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@svevang svevang merged commit 1b03bb4 into main Feb 29, 2024
3 checks passed
@svevang svevang deleted the fix-unarchived-episodes-published branch February 29, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants