-
Notifications
You must be signed in to change notification settings - Fork 455
feat(dashboard): worker label filters, webhook 429 on limit exhausted #4456
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
Changes from 2 commits
8a15816
8590760
dd55ab1
4355c20
2b5d4e7
dd39d4e
ff7b2bc
52fdeed
92c5442
11f01d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,6 +150,29 @@ WHERE | |
| ELSE 'ACTIVE' | ||
| END = ANY(sqlc.narg('statuses')::text[]) | ||
| ) | ||
| AND ( | ||
| sqlc.narg('labelKeys')::text[] IS NULL | ||
| OR sqlc.narg('labelValues')::text[] IS NULL | ||
| OR ( | ||
| SELECT BOOL_AND( | ||
| EXISTS ( | ||
| SELECT 1 | ||
| FROM "WorkerLabel" wl | ||
| WHERE wl."workerId" = workers."id" | ||
| AND wl."key" = lf.k | ||
| AND ( | ||
| wl."strValue" = lf.v | ||
| OR wl."intValue"::text = lf.v | ||
| ) | ||
| ) | ||
| ) | ||
| FROM ( | ||
| SELECT | ||
| UNNEST(sqlc.narg('labelKeys')::text[]) AS k, | ||
| UNNEST(sqlc.narg('labelValues')::text[]) AS v | ||
| ) AS lf | ||
|
Comment on lines
+169
to
+173
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol |
||
| ) | ||
| ) | ||
|
Comment on lines
+153
to
+175
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is gonna seq scan but I think it's fine ? |
||
| ORDER BY | ||
| workers."createdAt" DESC | ||
| OFFSET | ||
|
|
@@ -195,6 +218,29 @@ WHERE | |
| WHEN workers."isPaused" = true THEN 'PAUSED' | ||
| ELSE 'ACTIVE' | ||
| END = ANY(sqlc.narg('statuses')::text[]) | ||
| ) | ||
| AND ( | ||
| sqlc.narg('labelKeys')::text[] IS NULL | ||
| OR sqlc.narg('labelValues')::text[] IS NULL | ||
| OR ( | ||
| SELECT BOOL_AND( | ||
| EXISTS ( | ||
| SELECT 1 | ||
| FROM "WorkerLabel" wl | ||
| WHERE wl."workerId" = workers."id" | ||
| AND wl."key" = lf.k | ||
| AND ( | ||
| wl."strValue" = lf.v | ||
| OR wl."intValue"::text = lf.v | ||
| ) | ||
| ) | ||
| ) | ||
| FROM ( | ||
| SELECT | ||
| UNNEST(sqlc.narg('labelKeys')::text[]) AS k, | ||
| UNNEST(sqlc.narg('labelValues')::text[]) AS v | ||
| ) AS lf | ||
|
mrkaye97 marked this conversation as resolved.
|
||
| ) | ||
| ); | ||
|
|
||
| -- name: GetWorkerById :one | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to not get bitten here again... and or or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and