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

Use skip locked instead of advisory lock #34

Merged
merged 2 commits into from
Apr 7, 2019

Conversation

malthe
Copy link
Owner

@malthe malthe commented Apr 1, 2019

This fixes issue #33.

WHERE
t.id = selected.id AND
(t.schedule_at <= now() OR t.schedule_at is NULL)
RETURNING t.data, length(t.data::text) AS length
Copy link
Collaborator

Choose a reason for hiding this comment

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

@malthe it would be great if we could keep the previous set of returned values. A common case would be that you want to provide as much context as you can for your handler (the ID of the record at least).

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm not sure I understand, can you elaborate?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Apologies, my mistake, you moved it into the SELECT. Should be good. 🙈

@malthe malthe merged commit 54252da into master Apr 7, 2019
@malthe malthe deleted the use-skip-locked-instead-of-advisory-lock branch April 7, 2019 19:23
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