-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I was writing tests for River UI and found that when trying to pause an already paused queue or resume an unpaused queue, River returns a "not found" error. This was quite surprising, so much so that it took me a good half hour of debugging before I considered the fact that it might actually be a problem in upstream River. Even if an argument were to be made that pausing an already paused queue should be an error like "queue already paused", returning "not found" is misleading and guaranteed to result in confused people beyond just myself. I think it's fine for pause and resume to be considered idempotent operations. If a paused queue is paused again, there's no real damage done, especially if we keep the original paused time, which we do in this implementation. Similarly, make an update so that when pausing or resuming using the all queues string (`*`), don't return "not found" error if there are no queues in the database. Instead, just no-op.
- Loading branch information
Showing
6 changed files
with
133 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 35 additions & 18 deletions
53
riverdriver/riverpgxv5/internal/dbsqlc/river_queue.sql.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters