Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Ensure `ScheduledAt` is respected on `InsertManyTx`. [PR #121](https://github.com/riverqueue/river/pull/121).
- Fix typo in leadership resignation query to ensure faster new leader takeover. [PR #134](https://github.com/riverqueue/river/pull/134).

## [0.0.14] - 2023-12-13

Expand Down
2 changes: 1 addition & 1 deletion internal/dbsqlc/river_leader.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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

currently_held_leaders.name
FROM
currently_held_leaders)
Expand Down
2 changes: 1 addition & 1 deletion internal/dbsqlc/river_leader.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.