This repository was archived by the owner on Apr 22, 2024. It is now read-only.
[PIR-23] Increase maximum allowed data age for event replay#20
Closed
julianmclain wants to merge 3 commits intomasterfrom
Closed
[PIR-23] Increase maximum allowed data age for event replay#20julianmclain wants to merge 3 commits intomasterfrom
julianmclain wants to merge 3 commits intomasterfrom
Conversation
vbabenkoru
reviewed
Jun 3, 2020
| throw new IOException(iterableResponse.body().toString()); | ||
| } else if (!iterableResponse.isSuccessful()) { | ||
| if (iterableResponse.code() == 429 ) { | ||
| IterableLambdaResponse lambdaResponse = new IterableLambdaResponse(); |
There was a problem hiding this comment.
This doesn't seem to do anything. I think you'll need to pull this into IterableLambdaEndpoint
vbabenkoru
reviewed
Jun 3, 2020
| Event.Type.PRODUCT_ACTION); | ||
|
|
||
| // Specify maximum data age (especially relevant for Event Replays) | ||
| eventProcessingRegistration.setMaxDataAgeHours(365*24); |
There was a problem hiding this comment.
Suggested change
| eventProcessingRegistration.setMaxDataAgeHours(365*24); | |
| eventProcessingRegistration.setMaxDataAgeHours(-1); |
To make it unlimited
vbabenkoru
reviewed
Jun 3, 2020
| } | ||
|
|
||
| TrackRequest request = new TrackRequest(event.getName()); | ||
| request.id = event.getId().toString(); |
There was a problem hiding this comment.
Is getId() nullable? If so, I'd add a null check.
vbabenkoru
reviewed
Jun 5, 2020
| } catch (IOException e) { | ||
| Map<String, String> body = new HashMap<>(); | ||
| body.put("message", e.getMessage()); | ||
| ErrorResponse error = new ErrorResponse(500, body); |
There was a problem hiding this comment.
I think if we return this, Lambda metrics will start showing those requests as successful because they don't throw exceptions. It may be better to let the exception through for monitoring unless we know we can track them downstream.
Author
There was a problem hiding this comment.
That's a good call. I'll stop catching those exceptions unless we get another form of monitoring setup.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
IterableLambdaFunctionin order to support HTTP requests / responses/api/events/trackand/api/commerce/trackPurchaseevents