forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0074.yml
64 lines (64 loc) · 2.41 KB
/
0074.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: 74
description: get task queue(s) via worker manager service
migrationScript: |
begin
revoke select on workers from $db_user_prefix$_queue; -- undoing an issue from v0073
grant select on task_queues to $db_user_prefix$_worker_manager;
end
downgradeScript: |
begin
revoke select on task_queues from $db_user_prefix$_worker_manager;
end
methods:
get_task_queue_wm:
description: |-
Get a non-expired task queue by task_queue_id.
mode: read
serviceName: worker_manager
args: task_queue_id_in text, expires_in timestamptz, page_size_in integer, page_offset_in integer
returns: table(task_queue_id text, expires timestamptz, last_date_active timestamptz, description text, stability text, etag uuid)
body: |-
begin
return query
select
task_queues.task_queue_id,
task_queues.expires,
task_queues.last_date_active,
task_queues.description,
task_queues.stability,
public.gen_random_uuid()
from task_queues
where
(task_queues.task_queue_id = task_queue_id_in or task_queue_id_in is null) and
(task_queues.expires > expires_in or expires_in is null)
order by task_queue_id
limit get_page_limit(page_size_in)
offset get_page_offset(page_offset_in);
end
get_task_queues_wm:
description: |-
Get task queues ordered by `task_queue_id`.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
mode: read
serviceName: worker_manager
args: task_queue_id_in text, expires_in timestamptz, page_size_in integer, page_offset_in integer
returns: table(task_queue_id text, expires timestamptz, last_date_active timestamptz, description text, stability text, etag uuid)
body: |-
begin
return query
select
task_queues.task_queue_id,
task_queues.expires,
task_queues.last_date_active,
task_queues.description,
task_queues.stability,
public.gen_random_uuid()
from task_queues
where
(task_queues.task_queue_id = task_queue_id_in or task_queue_id_in is null) and
(task_queues.expires > expires_in or expires_in is null)
order by task_queue_id
limit get_page_limit(page_size_in)
offset get_page_offset(page_offset_in);
end