-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
queue-manager: reorganize into strategies
I realized that we need flexibility in defining queue strategies, not just in how the worker is designed, but also how the queue strategy handles the schedule function. This is an overhaul (not quite done yet) that does that. I stil need to plug the final query back in to move provisional to the worker queue. Also note that it looks like we have priority, pending, and other insert params to play with. Signed-off-by: vsoch <[email protected]>
- Loading branch information
Showing
9 changed files
with
341 additions
and
207 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package queries | ||
|
||
// Queries used by the main queue (and shared across strategies sometimes) | ||
const ( | ||
GetTimestampQuery = "select created_at from pods_provisional where group_name=$1 limit 1" | ||
SelectGroupsQuery = "select group_name, group_size, podspec from pods_provisional" | ||
GetPodQuery = "select * from pods_provisional where group_name=$1 and namespace=$2 and name=$3" | ||
InsertPodQuery = "insert into pods_provisional (podspec, namespace, name, created_at, group_name, group_size) values ($1, $2, $3, $4, $5, $6)" | ||
CountPodsQuery = "select count(*) from pods_provisional where group_name=$1" | ||
) |
Oops, something went wrong.