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

chore: Extract common parts of replay code #1288

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

patriknw
Copy link
Member

@patriknw patriknw commented Jan 8, 2025

No description provided.

.validate(envelope)
.flatMap {
case Accepted =>
accepted(envelope)
Copy link
Member Author

Choose a reason for hiding this comment

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

I looked at diffs of the the code that were in the handlers and the only difference was how the Accepted case was handled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, seemed that would be the case.

@@ -726,6 +491,8 @@ private[projection] object DynamoDBProjectionImpl {
import DynamoDBOffsetStore.Validation._
implicit val ec: ExecutionContext = system.executionContext

// This is similar to DynamoDBProjectionImpl.replayIfPossible but difficult to extract common parts
// since this is flow processing
Copy link
Member Author

Choose a reason for hiding this comment

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

For the flow handler I didn't see an easy way to reuse the same code so kept it as is

Copy link
Contributor

@pvlugter pvlugter left a comment

Choose a reason for hiding this comment

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

LGTM

@pvlugter pvlugter merged commit 260a5c5 into main Jan 8, 2025
22 checks passed
@pvlugter pvlugter deleted the wip-replay-cleanup-patriknw branch January 8, 2025 23:08
@patriknw patriknw added this to the 1.6.6 milestone Jan 9, 2025
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