-
Notifications
You must be signed in to change notification settings - Fork 2
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
Multiple notification channels in middleware #185
Conversation
Requires these configuration properties: PUSH_API_KEY: STSFYTHREMGUWXML
PUSH_API_URL: https://demo.ibigroupmobile.com/ext_api/otp_push/sound_transit Note that we only have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this PR is supposed to contain fetching of pushDevices
, but otherwise LGTM.
src/main/java/org/opentripplanner/middleware/utils/NotificationUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking previous approval back... @JymDyerIBI Could you address the test failures, please?
src/main/java/org/opentripplanner/middleware/utils/NotificationUtils.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tweak, and with that the PR will be good to go.
src/main/java/org/opentripplanner/middleware/tripmonitor/jobs/CheckMonitoredTrip.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies, one more change: #185 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
src/test/java/org/opentripplanner/middleware/utils/NotificationUtilsTest.java
Show resolved
Hide resolved
src/main/java/org/opentripplanner/middleware/tripmonitor/jobs/CheckMonitoredTrip.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, a check needs to be added to ensure the push notification config params are set before retrieving the number of registered devices and before sending push notifications.
…I_URL. Make inner sendPush() method package scope.
So this last change will make the public |
…I_URL. Make inner sendPush() method package scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
Checklist
dev
before they can be merged tomaster
)Description
WIP: Middleware preparing to have multiple notification channels, anticipating addition of push notifications.