Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
surprisetalk
· 2y ago · 0 comments
Here's the companion essay with more code snippets:
https://taylor.town/pg-task
Comments
[–]
698969
2y ago
In one of the snippets, there is a 10 second sleep inside a transaction to add delays between polling if there are no tasks,
Shouldn't that be outside the transaction?
[–]
surprisetalk
OP
2y ago
Yes, it would definitely be more performant to move it outside of the transaction :) good catch