-
Notifications
You must be signed in to change notification settings - Fork 93
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 typo in leadership resignation query #134
Conversation
eef6cd5
to
789610f
Compare
@@ -40,7 +40,7 @@ WITH currently_held_leaders AS ( | |||
), | |||
notified_resignations AS ( | |||
SELECT | |||
pg_notify('river_leaderhip', json_build_object('name', name, 'leader_id', leader_id, 'action', 'resigned')::text), | |||
pg_notify('river_leadership', json_build_object('name', name, 'leader_id', leader_id, 'action', 'resigned')::text), |
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.
Actually, another way to fix this would be to pass in the notification name using the in-code constant. That would ensure we're using the same value everywhere.
Thoughts?
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.
Yeah, good idea. It's already referenced in code anyway, so couldn't hurt just to use the same ref here.
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.
I’ll do this in a follow up PR, there are a couple we can get rid of
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.
Doh! LGTM.
@@ -40,7 +40,7 @@ WITH currently_held_leaders AS ( | |||
), | |||
notified_resignations AS ( | |||
SELECT | |||
pg_notify('river_leaderhip', json_build_object('name', name, 'leader_id', leader_id, 'action', 'resigned')::text), | |||
pg_notify('river_leadership', json_build_object('name', name, 'leader_id', leader_id, 'action', 'resigned')::text), |
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.
Yeah, good idea. It's already referenced in code anyway, so couldn't hurt just to use the same ref here.
s/river_leaderhip/river_leadership
🤦♂️