forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0078.yml
40 lines (40 loc) · 1.86 KB
/
0078.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: 78
description: fix filtering of static workers based on quarantined status
methods:
get_queue_workers_with_wm_join_quarantined:
deprecated: true
get_queue_workers_with_wm_join_quarantined_2:
description: |-
Get quarantined queue workers ordered by worker_pool_id, worker_group, and worker_id.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
This also performs an outer join with the worker_manager.worker table for more data.
mode: read
serviceName: worker_manager
args: task_queue_id_in text, page_size_in integer, page_offset_in integer
returns: table(worker_pool_id text, worker_group text, worker_id text, quarantine_until timestamptz, expires timestamptz, first_claim timestamptz, recent_tasks jsonb, last_date_active timestamptz, state text, capacity int4, provider_id text, etag uuid)
body: |-
begin
return query
select
queue_workers.task_queue_id as worker_pool_id,
queue_workers.worker_group,
queue_workers.worker_id,
queue_workers.quarantine_until,
queue_workers.expires,
queue_workers.first_claim,
queue_workers.recent_tasks,
queue_workers.last_date_active,
workers.state,
workers.capacity,
workers.provider_id,
public.gen_random_uuid()
from queue_workers
full outer join workers on workers.worker_id = queue_workers.worker_id
where
(queue_workers.task_queue_id = task_queue_id_in or get_queue_workers_with_wm_join_quarantined_2.task_queue_id_in is null)
and queue_workers.quarantine_until >= now()
order by worker_pool_id, worker_group, worker_id
limit get_page_limit(page_size_in)
offset get_page_offset(page_offset_in);
end