- auth functions
- github functions
- hooks functions
- index functions
- notify functions
- object functions
- purge_cache functions
- queue functions
add_task_dependency
azure_queue_count
azure_queue_delete
azure_queue_delete_expired
azure_queue_get
azure_queue_put
azure_queue_update
cancel_task
check_task_claim
claim_task
create_queue_artifact
create_queue_worker_tqid
create_task_queue
create_task_tqid
delete_queue_artifact
delete_queue_provisioner
delete_queue_worker_type
ensure_task_group
expire_queue_workers
expire_task_dependencies
expire_task_groups
expire_task_queues
expire_tasks
get_dependent_tasks
get_queue_artifact
get_queue_artifacts_paginated
get_queue_worker_tqid
get_queue_workers_tqid
get_task_group
get_task_queue
get_task_queues
get_task_tqid
get_tasks_by_task_group_tqid
is_task_blocked
is_task_group_active
mark_task_ever_resolved
reclaim_task
remove_task
remove_task_dependency
rerun_task
resolve_task
resolve_task_at_deadline
satisfy_task_dependency
schedule_task
update_queue_artifact
update_queue_worker_tqid
update_task_queue
- secrets functions
- web_server functions
- worker_manager functions
create_worker
create_worker_pool
create_worker_pool_error
delete_worker
delete_worker_pool
delete_worker_pool_error
expire_worker_pool_errors
expire_worker_pools
expire_workers
get_non_stopped_workers_2
get_worker_2
get_worker_pool_error
get_worker_pool_errors_for_worker_pool
get_worker_pool_with_capacity
get_worker_pools_with_capacity
get_workers_without_provider_data
remove_worker_pool_previous_provider_id
update_worker_2
update_worker_pool_provider_data
update_worker_pool_with_capacity
create_client
delete_client
expire_clients
get_client
get_clients
get_roles
modify_roles
update_client
update_client_last_used
- Mode: write
- Arguments:
client_id_in text
description_in text
encrypted_access_token_in jsonb
expires_in timestamptz
disabled_in boolean
scopes_in jsonb
delete_on_expiration_in boolean
- Returns:
void
Create a new client. The created and last_.. timestamps are all initialized to the current time. If the row exists but scopes, description, and expires match, disabled is false, and it was created in the last 15 minutes, then nothing is changed. Otherwise, a UNIQUE_VIOLATION is raised.
- Mode: write
- Arguments:
client_id_in text
- Returns:
void
Delete the given client. If the client does not exist, nothing happens.
- Mode: write
- Arguments:
- Returns:
integer
Delete all clients with an 'expires' in the past and with 'delete_on_expiration' set.
- Mode: read
- Arguments:
client_id_in text
- Returns:
table
client_id text
description text
encrypted_access_token jsonb
expires timestamptz
disabled boolean
scopes jsonb
created timestamptz
last_modified timestamptz
last_date_used timestamptz
last_rotated timestamptz
delete_on_expiration boolean
Get a client. Returns an empty set if the client does not exist.
- Mode: read
- Arguments:
prefix_in text
page_size_in integer
page_offset_in integer
- Returns:
table
client_id text
description text
encrypted_access_token jsonb
expires timestamptz
disabled boolean
scopes jsonb
created timestamptz
last_modified timestamptz
last_date_used timestamptz
last_rotated timestamptz
delete_on_expiration boolean
Get clients, ordered by client_id. If specified, only clients with
client_id beginning with prefix
are returned. If the pagination
arguments are both NULL, all rows are returned. Otherwise, page_size
rows are returned at offset page_offset.
- Mode: read
- Arguments:
- Returns:
table
role_id text
scopes jsonb
created timestamptz
description text
last_modified timestamptz
etag uuid
Get the full set of roles. Each result row has an etag, but all such etags will be the same, representing the etag for the most recent modification of the table. Results are sorted by role_id.
- Mode: write
- Arguments:
roles_in jsonb
old_etag_in uuid
- Returns:
void
Replace the current set of roles entirely with the given set of roles, if the current etag matches the existing etag.
The role objects are specified with underscore spelling (role_id
).
If the etag has changed, this returns P0004 signalling that the caller should fetch a fresh set of roles and try again.
If there are no existing roles, then the old etag is not used.
- Mode: write
- Arguments:
client_id_in text
description_in text
encrypted_access_token_in jsonb
expires_in timestamptz
disabled_in boolean
scopes_in jsonb
delete_on_expiration_in boolean
- Returns:
table
client_id text
description text
encrypted_access_token jsonb
expires timestamptz
disabled boolean
scopes jsonb
created timestamptz
last_modified timestamptz
last_date_used timestamptz
last_rotated timestamptz
delete_on_expiration boolean
Update an existing client, returning the updated client or, if no such client exists, an empty set. This does not implement optimistic concurrency: any non-null arguments to this function will overwrite existing values. The last_modified column is updated automatically, as is last_rotated if the access token is set.
- Mode: write
- Arguments:
client_id_in text
- Returns:
void
Indicate that this client has been recently used, updating its last_date_used field. Does nothing if the client does not exist.
create_github_build
create_github_check
delete_github_build
get_github_build
get_github_builds
get_github_check_by_task_id
get_github_integration
get_github_integrations
set_github_build_state
upsert_github_integration
- Mode: write
- Arguments:
organization_in text
repository_in text
sha_in text
task_group_id_in text
state_in text
created_in timestamptz
updated_in timestamptz
installation_id_in integer
event_type_in text
event_id_in text
- Returns:
void
Create a new github build. Raises UNIQUE_VIOLATION if the pool already exists.
- Mode: write
- Arguments:
task_group_id_in text
task_id_in text
check_suite_id_in text
check_run_id_in text
- Returns:
void
Upsert a single check.
- Mode: write
- Arguments:
task_group_id_in text
- Returns:
void
Delete a github build.
- Mode: read
- Arguments:
task_group_id_in text
- Returns:
table
organization text
repository text
sha text
task_group_id text
state text
created timestamptz
updated timestamptz
installation_id integer
event_type text
event_id text
etag uuid
Get a github build. The returned table will have one or zero rows.
- Mode: read
- Arguments:
page_size_in integer
page_offset_in integer
organization_in text
repository_in text
sha_in text
- Returns:
table
organization text
repository text
sha text
task_group_id text
state text
created timestamptz
updated timestamptz
installation_id integer
event_type text
event_id text
etag uuid
Get github builds.
- Mode: read
- Arguments:
task_id_in text
- Returns:
table
task_group_id text
task_id text
check_suite_id text
check_run_id text
Get a single check from a task_id.
- Mode: read
- Arguments:
owner_in text
- Returns:
table
owner text
installation_id integer
Get a single integration by owner.
- Mode: read
- Arguments:
page_size_in integer
page_offset_in integer
- Returns:
table
owner text
installation_id integer
Get a list of integrations.
- Mode: write
- Arguments:
task_group_id_in text
state_in text
- Returns:
void
Only update the state of a build and update the updated
timestamp
- Mode: write
- Arguments:
owner_in text
installation_id_in integer
- Returns:
void
Create a single integration.
create_hook
create_hooks_queue
create_last_fire
delete_hook
delete_hooks_queue
delete_last_fires
expire_last_fires
get_hook
get_hooks
get_hooks_queues
get_last_fire
get_last_fires
update_hook
update_hooks_queue_bindings
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
metadata_in jsonb
task_in jsonb
bindings_in jsonb
schedule_in jsonb
encrypted_trigger_token_in jsonb
encrypted_next_task_id_in jsonb
next_scheduled_date_in timestamptz
trigger_schema_in jsonb
- Returns:
table
hook_group_id text
hook_id text
metadata jsonb
task jsonb
bindings jsonb
schedule jsonb
encrypted_trigger_token jsonb
encrypted_next_task_id jsonb
next_scheduled_date timestamptz
trigger_schema jsonb
Create a new hook. Raises UNIQUE_VIOLATION if the artifact already exists. Returns the newly created hook.
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
queue_name_in text
bindings_in jsonb
- Returns:
uuid
Create a new hooks queue. Raises UNIQUE_VIOLATION if the hook already exists.
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
fired_by_in text
task_id_in text
task_create_time_in timestamptz
result_in text
error_in text
- Returns:
uuid
Create a new hook last fire. Raises UNIQUE_VIOLATION if the hook already exists.
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
- Returns:
void
Delete a hook.
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
- Returns:
void
Delete a hooks queue.
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
- Returns:
void
Delete last fires that match a given hook_group_id
and hook_id
.
- Mode: write
- Arguments:
- Returns:
integer
Expire last fires that are older than a year. Returns a count of rows that have been deleted.
- Mode: read
- Arguments:
hook_group_id_in text
hook_id_in text
- Returns:
table
hook_group_id text
hook_id text
metadata jsonb
task jsonb
bindings jsonb
schedule jsonb
encrypted_trigger_token jsonb
encrypted_next_task_id jsonb
next_scheduled_date timestamptz
trigger_schema jsonb
Get a hook. The returned table will have one or zero rows.
- Mode: read
- Arguments:
hook_group_id_in text
next_scheduled_date_in timestamptz
page_size_in integer
page_offset_in integer
- Returns:
table
hook_group_id text
hook_id text
metadata jsonb
task jsonb
bindings jsonb
schedule jsonb
encrypted_trigger_token jsonb
encrypted_next_task_id jsonb
next_scheduled_date timestamptz
trigger_schema jsonb
Get existing hooks filtered by the optional hook_group_id
,
ordered by the hook_group_id
and hook_id
.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
- Mode: read
- Arguments:
page_size_in integer
page_offset_in integer
- Returns:
table
hook_group_id text
hook_id text
queue_name text
bindings jsonb
etag uuid
Get hooks queues ordered by hook_group_id
and hook_id
.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
- Mode: read
- Arguments:
hook_group_id_in text
hook_id_in text
task_id_in text
- Returns:
table
hook_group_id text
hook_id text
fired_by text
task_id text
task_create_time timestamptz
result text
error text
etag uuid
Get a hook last fire.
- Mode: read
- Arguments:
hook_group_id_in text
hook_id_in text
page_size_in integer
page_offset_in integer
- Returns:
table
hook_group_id text
hook_id text
fired_by text
task_id text
task_create_time timestamptz
result text
error text
etag uuid
Get hooks last fires filtered by the hook_group_id
and hook_id
arguments,
ordered by hook_group_id
, hook_id
, and worker_id
.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
metadata_in jsonb
task_in jsonb
bindings_in jsonb
schedule_in jsonb
encrypted_trigger_token_in jsonb
encrypted_next_task_id_in jsonb
next_scheduled_date_in timestamptz
trigger_schema_in jsonb
- Returns:
table
hook_group_id text
hook_id text
metadata jsonb
task jsonb
bindings jsonb
schedule jsonb
encrypted_trigger_token jsonb
encrypted_next_task_id jsonb
next_scheduled_date timestamptz
trigger_schema jsonb
Update a queue artifact. Returns the up-to-date hook row that have the same hook group id and hook id.
- Mode: write
- Arguments:
hook_group_id_in text
hook_id_in text
bindings_in jsonb
- Returns:
table
hook_group_id text
hook_id text
queue_name text
bindings jsonb
etag uuid
Update bindings of a hooks queue. If no such queue exists, the return value is an empty set.
create_index_namespace
create_indexed_task
expire_index_namespaces
expire_indexed_tasks
get_index_namespace
get_index_namespaces
get_indexed_task
get_indexed_tasks
update_index_namespace
update_indexed_task
- Mode: write
- Arguments:
parent_in text
name_in text
expires_in timestamptz
- Returns:
table
parent text
name text
expires timestamptz
Create a new namespace. Raises UNIQUE_VIOLATION if the namespace already exists. Returns the newly created namespace.
- Mode: write
- Arguments:
namespace_in text
name_in text
rank_in integer
task_id_in text
data_in jsonb
expires_in timestamptz
- Returns:
table
namespace text
name text
rank integer
task_id text
data jsonb
expires timestamptz
Create a new indexed task. Raises UNIQUE_VIOLATION if the indexed task already exists. Returns the newly created indexed task.
- Mode: write
- Arguments:
- Returns:
integer
Expire index_namespaces that come before the current time. Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
- Returns:
integer
Expire indexed tasks that come before the current time. Returns a count of rows that have been deleted.
- Mode: read
- Arguments:
parent_in text
name_in text
- Returns:
table
parent text
name text
expires timestamptz
Get a namespace. The returned table will have one or zero rows.
- Mode: read
- Arguments:
parent_in text
name_in text
page_size_in integer
page_offset_in integer
- Returns:
table
parent text
name text
expires timestamptz
Get existing index_namespaces filtered by the optional arguments,
ordered by the parent
and name
.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
- Mode: read
- Arguments:
namespace_in text
name_in text
- Returns:
table
namespace text
name text
rank integer
task_id text
data jsonb
expires timestamptz
Get an indexed task. The returned table will have one or zero rows.
- Mode: read
- Arguments:
namespace_in text
name_in text
page_size_in integer
page_offset_in integer
- Returns:
table
namespace text
name text
rank integer
task_id text
data jsonb
expires timestamptz
Get existing indexed tasks filtered by the optional arguments,
ordered by the namespace
and name
.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
- Mode: write
- Arguments:
parent_in text
name_in text
expires_in timestamptz
- Returns:
table
parent text
name text
expires timestamptz
Update a namespace. Returns the up-to-date namespace row that have the same parent and name. If the row is not found then an exception with code 'P0002' is thrown.
- Mode: write
- Arguments:
namespace_in text
name_in text
rank_in integer
task_id_in text
data_in jsonb
expires_in timestamptz
- Returns:
table
namespace text
name text
rank integer
task_id text
data jsonb
expires timestamptz
Update an indexed task. Returns the up-to-date indexed task row that have the same namespace and name.
- Mode: write
- Arguments:
notification_type_in text
notification_address_in text
- Returns:
void
If the denylist address already exists, this is a no-op. Otherwise, add the denylist address for the taskcluster-notify service, with a new random etag.
- Mode: read
- Arguments:
page_size_in integer
page_offset_in integer
- Returns:
table
notification_type text
notification_address text
List all denylist addresses for the taskcluster-notify service.
- Mode: write
- Arguments:
notification_type_in text
notification_address_in text
- Returns:
integer
Delete a denylist address for the taskcluster-notify service. Returns number of rows deleted (0 or 1).
- Mode: read
- Arguments:
notification_type_in text
notification_address_in text
- Returns:
boolean
Returns a boolean indicating whether the denylist type/address exists.
create_object_for_upload
delete_object
get_expired_objects
get_object_with_upload
object_upload_complete
- Mode: write
- Arguments:
name_in text
project_id_in text
backend_id_in text
upload_id_in text
upload_expires_in timestamptz
data_in jsonb
expires_in timestamptz
- Returns:
void
Create an object record ready for upload.
This method is idempotent, and will succeed if called multiple times with
the same parameters, as long as upload_id
is still set (that is, until
the upload is completed). Otherwise it will raise a UNIQUE_VIOLATION
exception. upload_expires_in
is excluded from this comparison.
- Mode: write
- Arguments:
name_in text
- Returns:
void
Delete an object.
- Mode: read
- Arguments:
limit_in integer
start_at_in text
- Returns:
table
name text
data jsonb
project_id text
backend_id text
expires timestamptz
Get objects with an expiration before the current time. If given, only
objects with a name greater than start_at_in
are returned. The
limit_in
argument limits the number of results returned. This returns
both expired objects (expires < now) and expired uploads (upload_expires
< now).
- Mode: read
- Arguments:
name_in text
- Returns:
table
name text
data jsonb
project_id text
backend_id text
upload_id text
upload_expires timestamptz
expires timestamptz
Get an object by name, or an empty set if no such object exists.
- Mode: write
- Arguments:
name_in text
upload_id_in text
- Returns:
void
Mark an object as uploaded and ready for download.
This method is idempotent, and will succeed if the object is already ready for download.
create_object(name_in text, project_id_in text, backend_id_in text, data_in jsonb, expires_in timestamptz)
(compatibility guaranteed until v41.0.0)get_object(name_in text)
(compatibility guaranteed until v41.0.0)
- Mode: read
- Arguments:
page_size_in integer
page_offset_in integer
- Returns:
table
worker_pool_id text
cache_name text
before timestamptz
View all active purge requests.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Expire cache purges that come before expires_in
.
Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
worker_pool_id_in text
cache_name_in text
before_in timestamptz
expires_in timestamptz
- Returns:
void
Publish a request to purge caches with name cache_name_in
on provisioner_id_in
/worker_type_in
workers.
- Mode: read
- Arguments:
worker_pool_id_in text
- Returns:
table
worker_pool_id text
cache_name text
before timestamptz
List the caches for this provisioner_id_in
/worker_type_in
.
add_task_dependency
azure_queue_count
azure_queue_delete
azure_queue_delete_expired
azure_queue_get
azure_queue_put
azure_queue_update
cancel_task
check_task_claim
claim_task
create_queue_artifact
create_queue_worker_tqid
create_task_queue
create_task_tqid
delete_queue_artifact
delete_queue_provisioner
delete_queue_worker_type
ensure_task_group
expire_queue_workers
expire_task_dependencies
expire_task_groups
expire_task_queues
expire_tasks
get_dependent_tasks
get_queue_artifact
get_queue_artifacts_paginated
get_queue_worker_tqid
get_queue_workers_tqid
get_task_group
get_task_queue
get_task_queues
get_task_tqid
get_tasks_by_task_group_tqid
is_task_blocked
is_task_group_active
mark_task_ever_resolved
reclaim_task
remove_task
remove_task_dependency
rerun_task
resolve_task
resolve_task_at_deadline
satisfy_task_dependency
schedule_task
update_queue_artifact
update_queue_worker_tqid
update_task_queue
- Mode: write
- Arguments:
dependent_task_id_in text
required_task_id_in text
requires_in task_requires
expires_in timestamptz
- Returns:
void
Create an un-satisfied task dependency between the two tasks, with the given requirement style and expiration. If the dependency already exists, nothing happens.
- Mode: read
- Arguments:
queue_name text
- Returns:
integer
Count non-expired messages in the named queue.
- Mode: write
- Arguments:
queue_name text
message_id uuid
pop_receipt uuid
- Returns:
void
Delete the message identified by the given queue_name
, message_id
and
pop_receipt
.
- Mode: write
- Arguments:
- Returns:
void
Delete all expired messages. This is a maintenance task that should occur about once an hour.
- Mode: write
- Arguments:
queue_name text
visible timestamp
count integer
- Returns:
table
message_id uuid
message_text text
pop_receipt uuid
Get up to count
messages from the given queue, setting the visible
column of each to the given value. Returns a message_id
and
pop_receipt
for each one, for use with azure_queue_delete
and
azure_queue_update
.
- Mode: write
- Arguments:
queue_name text
message_text text
visible timestamp
expires timestamp
- Returns:
void
Put the given message into the given queue. The message will not be visible until after the visible timestamp, and will disappear after the expires timestamp.
- Mode: write
- Arguments:
queue_name text
message_text text
message_id uuid
pop_receipt uuid
visible timestamp
- Returns:
void
Update the message identified by the given queue_name
, message_id
and
pop_receipt
, setting its visible
and message_text
properties as
given.
- Mode: write
- Arguments:
task_id text
reason text
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
If the current run is pending or running, mark it as exception with the given reason. If the task is unscheduled, a run with that status is created to represent the cancellation. This returns the task's updated status, or nothing if the current status was not as expected.
- Mode: write
- Arguments:
task_id text
run_id int
taken_until_in timestamptz
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
Check the given task for a claim on the given run expiring at the given time. If the run is still running, it is marked as claim-expired and a retry scheduled (if retries_left).
This returns the task's updated status, or nothing if the current status was not as expected.
- Mode: write
- Arguments:
task_id text
run_id int
worker_group text
worker_id text
hint_id text
taken_until_in timestamptz
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
Claim the given run of the given task for the given worker. The hint is recorded in the run, for comparison when the claim expires. This returns the task's updated status, or nothing if the current status was not as expected.
- Mode: write
- Arguments:
task_id_in text
run_id_in integer
name_in text
storage_type_in text
content_type_in text
details_in jsonb
present_in boolean
expires_in timestamptz
- Returns:
table
task_id text
run_id integer
name text
storage_type text
content_type text
details jsonb
present boolean
expires timestamptz
Create a new artifact. Raises UNIQUE_VIOLATION if the artifact already exists. Returns the newly created artifact.
- Mode: write
- Arguments:
task_queue_id_in text
worker_group_in text
worker_id_in text
quarantine_until_in timestamptz
expires_in timestamptz
first_claim_in timestamptz
recent_tasks_in jsonb
- Returns:
uuid
Create a new queue worker. Raises UNIQUE_VIOLATION if the worker already exists.
- Mode: write
- Arguments:
task_queue_id_in text
expires_in timestamptz
last_date_active_in timestamptz
description_in text
stability_in text
- Returns:
uuid
Create a new task queue. Raises UNIQUE_VIOLATION if the task queue already exists.
- Mode: write
- Arguments:
task_id text
task_queue_id text
scheduler_id text
task_group_id text
dependencies jsonb
requires task_requires
routes jsonb
priority task_priority
retries integer
created timestamptz
deadline timestamptz
expires timestamptz
scopes jsonb
payload jsonb
metadata jsonb
tags jsonb
extra jsonb
- Returns:
void
Create a new task, without scheduling it, and with empty values for the status information.
- Mode: write
- Arguments:
task_id_in text
run_id_in integer
name_in text
- Returns:
void
Delete a queue artifact.
- Mode: write
- Arguments:
provisioner_id text
stability text
description text
- Returns:
void
Delete a queue provisioner.
- Mode: write
- Arguments:
provisioner_id text
worker_type text
stability text
description text
- Returns:
void
Delete a queue worker type.
- Mode: write
- Arguments:
task_group_id_in text
scheduler_id_in text
expires_in timestamptz
- Returns:
void
Ensure that the given task group exists, has the matching scheduler_id, and has an expiration greater than the given expiration. Expiration is bumped by an hour at a time to avoid unnecessary updates. This returns 23505 (UNIQUE_VIOLATION) when the group exists with a different scheduler_id.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Expire non-quarantined queue workers that come before expires_in
.
Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Delete task dependencies with expiration dates before expires_in
.
Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Delete task groups with expiration dates before expires_in
.
Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Expire task queues that come before expires_in
.
Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Delete tasks with expiration dates before expires_in
.
Returns a count of rows that have been deleted.
- Mode: read
- Arguments:
required_task_id_in text
satisfied_in boolean
tasks_after_in text
page_size_in integer
page_offset_in integer
- Returns:
table
dependent_task_id text
requires task_requires
satisfied boolean
Get the un-expired tasks that depend on this one, limiting to only (un)satisfied
dependencies if satisfied_in
is not null.
Only dependencies with dependent_task_id > tasks_after_in
are returned.
This supports paginated queries that are not susceptible to rows being
added or removed. Typically only one of page_offset_in
and
tasks_after_in
are non-null.
- Mode: read
- Arguments:
task_id_in text
run_id_in integer
name_in text
- Returns:
table
task_id text
run_id integer
name text
storage_type text
content_type text
details jsonb
present boolean
expires timestamptz
Get a queue artifact. The returned table will have one or zero row.
- Mode: read
- Arguments:
task_id_in text
run_id_in integer
expires_in timestamptz
page_size_in integer
after_task_id_in text
after_run_id_in integer
after_name_in text
- Returns:
table
task_id text
run_id integer
name text
storage_type text
content_type text
details jsonb
present boolean
expires timestamptz
Get existing queue artifacts, filtered by the optional arguments, ordered
by the task_id
, run_id
, and name
. The after_*
arguments specify
where the page of results should begin, and must all be specified if any
are specified. Typically these values would be drawn from the last item
in the previous page.
- Mode: read
- Arguments:
task_queue_id_in text
worker_group_in text
worker_id_in text
expires_in timestamptz
- Returns:
table
task_queue_id text
worker_group text
worker_id text
quarantine_until timestamptz
expires timestamptz
first_claim timestamptz
recent_tasks jsonb
etag uuid
Get a non-expired queue worker by task_queue_id, worker_group, and worker_id. Workers are not considered expired until after their quarantine date expires.
- Mode: read
- Arguments:
task_queue_id_in text
expires_in timestamptz
page_size_in integer
page_offset_in integer
- Returns:
table
task_queue_id text
worker_group text
worker_id text
quarantine_until timestamptz
expires timestamptz
first_claim timestamptz
recent_tasks jsonb
etag uuid
Get non-expired queue workers ordered by task_queue_id, worker_group, and worker_id. Workers are not considered expired until after their quarantine date expires. If the pagination arguments are both NULL, all rows are returned. Otherwise, page_size rows are returned at offset page_offset.
- Mode: read
- Arguments:
task_group_id_in text
- Returns:
table
task_group_id text
scheduler_id text
expires timestamptz
Get a task group.
- Mode: read
- Arguments:
task_queue_id_in text
expires_in timestamptz
- Returns:
table
task_queue_id text
expires timestamptz
last_date_active timestamptz
description text
stability text
etag uuid
Get a non-expired task queue by task_queue_id.
- Mode: read
- Arguments:
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
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
- Arguments:
task_id_in text
- Returns:
table
task_id text
task_queue_id text
scheduler_id text
task_group_id text
dependencies jsonb
requires task_requires
routes jsonb
priority task_priority
retries integer
retries_left int
created timestamptz
deadline timestamptz
expires timestamptz
scopes jsonb
payload jsonb
metadata jsonb
tags jsonb
extra jsonb
runs jsonb
taken_until timestamptz
Get all properties of a task. Note that all properties but runs
,
retries_left
, and taken_until
are immutable.
- Mode: read
- Arguments:
task_group_id_in text
page_size_in integer
page_offset_in integer
- Returns:
table
task_id text
task_queue_id text
scheduler_id text
task_group_id text
dependencies jsonb
requires task_requires
routes jsonb
priority task_priority
retries integer
retries_left int
created timestamptz
deadline timestamptz
expires timestamptz
scopes jsonb
payload jsonb
metadata jsonb
tags jsonb
extra jsonb
runs jsonb
taken_until timestamptz
Get all properties of all tasks in the given task group.
- Mode: read
- Arguments:
dependent_task_id_in text
- Returns:
boolean
Return true if the task has remaining un-satisfied dependencies.
- Mode: read
- Arguments:
task_group_id_in text
- Returns:
boolean
temp, removed in next commit
- Mode: write
- Arguments:
task_id_in text
- Returns:
void
temp, removed in next commit
- Mode: write
- Arguments:
task_id text
run_id int
taken_until_in timestamptz
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
Relaim the given run of the given task run, until the new taken_until time. This returns the task's updated status, or nothing if the current status was not as expected.
- Mode: write
- Arguments:
task_id text
- Returns:
void
Remove the given task, regardless of its expiration status. This is typically used when task creation has failed.
- Mode: write
- Arguments:
dependent_task_id_in text
required_task_id_in text
- Returns:
void
Mark the given dependency as satisfied. If the dependency does not exist, nothing happens.
- Mode: write
- Arguments:
task_id text
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
Ensure that no run is currently running or pending, and then create a new
pending run with the given reason. This also resets the retries_left
column to retries
(unless the sanity-check maximum runs has been
reached). This returns the task's updated status, or nothing if the
current status was not as expected.
- Mode: write
- Arguments:
task_id text
run_id int
state text
reason text
retry_reason text
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
Resolve the given run with the given state and reason, setting
run.resolved and resetting taken_until
. If retry_reason
is not null
and there are retries_left
, a new pending run is added, and
retries_left
is decremented. This returns the task's updated status,
or nothing if the current status was not as expected.
- Mode: write
- Arguments:
task_id text
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
The given task has reached its deadline, so mark it as resolved, adding a run if necessary. This returns the task's updated status, or nothing if the current status was not as expected.
- Mode: write
- Arguments:
dependent_task_id_in text
required_task_id_in text
- Returns:
void
Mark the given dependency as satisfied. If the dependency does not exist, nothing happens.
- Mode: write
- Arguments:
task_id text
reason_created text
- Returns:
table
retries_left integer
runs jsonb
taken_until timestamptz
Schedule the initial run for a task, moving the task from "unscheduled" to "pending". This returns the task's updated status, or nothing if the current status was not as expected.
- Mode: write
- Arguments:
task_id_in text
run_id_in integer
name_in text
details_in jsonb
expires_in timestamptz
- Returns:
table
task_id text
run_id integer
name text
storage_type text
content_type text
details jsonb
present boolean
expires timestamptz
Update a queue artifact. Returns the up-to-date artifact row that have the same task id, run id, and name.
- Mode: write
- Arguments:
task_queue_id_in text
worker_group_in text
worker_id_in text
quarantine_until_in timestamptz
expires_in timestamptz
recent_tasks_in jsonb
- Returns:
table
task_queue_id text
worker_group text
worker_id text
quarantine_until timestamptz
expires timestamptz
first_claim timestamptz
recent_tasks jsonb
etag uuid
Update a queue worker's quarantine_until, expires, and recent_tasks. All parameters must be supplied.
- Mode: write
- Arguments:
task_queue_id_in text
expires_in timestamptz
last_date_active_in timestamptz
description_in text
stability_in text
- Returns:
table
task_queue_id text
expires timestamptz
last_date_active timestamptz
description text
stability text
etag uuid
Update a task queue's expires, last_date_active, description, and stability. All parameters must be supplied.
create_task(task_id text, provisioner_id text, worker_type text, scheduler_id text, task_group_id text, dependencies jsonb, requires task_requires, routes jsonb, priority task_priority, retries integer, created timestamptz, deadline timestamptz, expires timestamptz, scopes jsonb, payload jsonb, metadata jsonb, tags jsonb, extra jsonb)
(compatibility guaranteed until v41.0.0)get_queue_artifacts(task_id_in text, run_id_in integer, expires_in timestamptz, page_size_in integer, page_offset_in integer)
(compatibility guaranteed until v41.0.0)get_task(task_id_in text)
(compatibility guaranteed until v41.0.0)get_tasks_by_task_group(task_group_id_in text, page_size_in integer, page_offset_in integer)
(compatibility guaranteed until v41.0.0)
- Mode: write
- Arguments:
name_in text
- Returns:
void
Delete a secret entirely
- Mode: write
- Arguments:
- Returns:
integer
Delete all secrets with an 'expires' in the past.
- Mode: read
- Arguments:
name_in text
- Returns:
table
name text
encrypted_secret jsonb
expires timestamptz
Get a single secret (including secret content and expiration)
- Mode: read
- Arguments:
page_size_in integer
page_offset_in integer
- Returns:
table
name text
Get many secrets at once. This only includes names. Fetch an individual secret to get the contents
- Mode: write
- Arguments:
name_in text
encrypted_secret_in jsonb
expires_in timestamptz
- Returns:
void
Store an encrypted secret whether it is new or being updated
add_github_access_token
create_access_token
create_authorization_code
expire_access_tokens
expire_authorization_codes
expire_sessions
get_access_token
get_authorization_code
load_github_access_token
session_add
session_load
session_remove
session_touch
- Mode: write
- Arguments:
user_id_in text
encrypted_access_token_in jsonb
- Returns:
void
Sets the encrypted access token for user_id_in
to
encrypted_access_token_in
.
If no access token is currently set for user_id_in
, a new row is
inserted, otherwise the existing row's encrypted access token is updated
to encrypted_access_token_in
.
- Mode: write
- Arguments:
hashed_access_token_in text
encrypted_access_token_in jsonb
client_id_in text
redirect_uri_in text
identity_in text
identity_provider_id_in text
expires_in timestamptz
client_details_in jsonb
- Returns:
table
hashed_access_token text
encrypted_access_token jsonb
client_id text
redirect_uri text
identity text
identity_provider_id text
expires timestamptz
client_details jsonb
Create an access token entry.
- Mode: write
- Arguments:
code_in text
client_id_in text
redirect_uri_in text
identity_in text
identity_provider_id_in text
expires_in timestamptz
client_details_in jsonb
- Returns:
table
code text
client_id text
redirect_uri text
identity text
identity_provider_id text
expires timestamptz
client_details jsonb
Create an authorization code.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Delete access token entries that expireq before the current time. Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Delete authorization codes that expire before expires_in
.
Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
- Returns:
integer
Delete sessions that expire before the current time. Returns a count of rows that have been deleted.
- Mode: read
- Arguments:
hashed_access_token_in text
- Returns:
table
hashed_access_token text
encrypted_access_token jsonb
client_id text
redirect_uri text
identity text
identity_provider_id text
expires timestamptz
client_details jsonb
Get an access token entry.
- Mode: read
- Arguments:
code_in text
- Returns:
table
code text
client_id text
redirect_uri text
identity text
identity_provider_id text
expires timestamptz
client_details jsonb
Get an authorization code entry given a code.
- Mode: read
- Arguments:
user_id_in text
- Returns:
table
encrypted_access_token jsonb
Returns the encrypted github access token for a given user.
- Mode: write
- Arguments:
hashed_session_id_in text
encrypted_session_id_in jsonb
data_in jsonb
expires_in timestamptz
- Returns:
void
Set a session.
If no session exists with hashed session id hashed_session_id_in
,
a new row is inserted, otherwise the existing session's data is replaced
with the data in data_in
.
- Mode: read
- Arguments:
hashed_session_id_in text
- Returns:
table
hashed_session_id text
encrypted_session_id jsonb
data jsonb
expires timestamptz
Returns the session for a given hashed session id.
- Mode: write
- Arguments:
hashed_session_id_in text
- Returns:
void
Removes a web session
- Mode: write
- Arguments:
hashed_session_id_in text
data_in jsonb
expires_in timestamptz
- Returns:
void
Touch a given session given a hashed session id and session data
.
If the hashed session id does not exist, then an error code P0002
will be thrown.
create_worker
create_worker_pool
create_worker_pool_error
delete_worker
delete_worker_pool
delete_worker_pool_error
expire_worker_pool_errors
expire_worker_pools
expire_workers
get_non_stopped_workers_2
get_worker_2
get_worker_pool_error
get_worker_pool_errors_for_worker_pool
get_worker_pool_with_capacity
get_worker_pools_with_capacity
get_workers_without_provider_data
remove_worker_pool_previous_provider_id
update_worker_2
update_worker_pool_provider_data
update_worker_pool_with_capacity
- Mode: write
- Arguments:
worker_pool_id_in text
worker_group_in text
worker_id_in text
provider_id_in text
created_in timestamptz
expires_in timestamptz
state_in text
provider_data_in jsonb
capacity_in integer
last_modified_in timestamptz
last_checked_in timestamptz
- Returns:
uuid
Create a new worker. Raises UNIQUE_VIOLATION if the worker already exists. Returns the etag of the newly created worker.
- Mode: write
- Arguments:
worker_pool_id_in text
provider_id_in text
previous_provider_ids_in jsonb
description_in text
config_in jsonb
created_in timestamptz
last_modified_in timestamptz
owner_in text
email_on_error_in boolean
provider_data_in jsonb
- Returns:
void
Create a new worker pool. Raises UNIQUE_VIOLATION if the pool already exists.
- Mode: write
- Arguments:
error_id_in text
worker_pool_id_in text
reported_in timestamptz
kind_in text
title_in text
description_in text
extra_in jsonb
- Returns:
uuid
Create a new worker pool error. Raises UNIQUE_VIOLATION if the error already exists.
- Mode: write
- Arguments:
worker_pool_id_in text
worker_group_in text
worker_id_in text
- Returns:
void
Delete a worker.
- Mode: write
- Arguments:
worker_pool_id_in text
- Returns:
void
Delete a worker pool immediately.
- Mode: write
- Arguments:
error_id_in text
worker_pool_id_in text
- Returns:
void
Delete a worker pool error immediately.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Expire worker pool errors reported before expires_in
.
Returns a count of rows that have been deleted.
- Mode: write
- Arguments:
- Returns:
table
worker_pool_id text
Expire worker pools, deleting those which have provider-id null-provider and no previous_provider_ids. Returns the worker pool ids that it deletes.
- Mode: write
- Arguments:
expires_in timestamptz
- Returns:
integer
Expire workers that come before expires_in
.
Returns a count of rows that have been deleted.
- Mode: read
- Arguments:
worker_pool_id_in text
worker_group_in text
worker_id_in text
page_size_in integer
page_offset_in integer
- Returns:
table
worker_pool_id text
worker_group text
worker_id text
provider_id text
created timestamptz
expires timestamptz
state text
provider_data jsonb
capacity integer
last_modified timestamptz
last_checked timestamptz
secret jsonb
etag uuid
Get non-stopped workers filtered by the optional arguments,
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
.
- Mode: read
- Arguments:
worker_pool_id_in text
worker_group_in text
worker_id_in text
- Returns:
table
worker_pool_id text
worker_group text
worker_id text
provider_id text
created timestamptz
expires timestamptz
state text
provider_data jsonb
capacity integer
last_modified timestamptz
last_checked timestamptz
secret jsonb
etag uuid
Get an existing worker. The returned table will have one or (if no such worker is defined) zero rows.
- Mode: read
- Arguments:
error_id_in text
worker_pool_id_in text
- Returns:
table
error_id text
worker_pool_id text
reported timestamptz
kind text
title text
description text
extra jsonb
Get an existing worker pool error. The returned table will have one or (if no such worker pool error is defined) zero rows.
- Mode: read
- Arguments:
error_id_in text
worker_pool_id_in text
page_size_in integer
page_offset_in integer
- Returns:
table
error_id text
worker_pool_id text
reported timestamptz
kind text
title text
description text
extra jsonb
Get existing worker pool errors filtered by worker_pool_id
and error_id
,
ordered by reported
.
If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
- Mode: read
- Arguments:
worker_pool_id_in text
- Returns:
table
worker_pool_id text
provider_id text
previous_provider_ids jsonb
description text
config jsonb
created timestamptz
last_modified timestamptz
owner text
email_on_error boolean
provider_data jsonb
current_capacity integer
Get an existing worker pool. The returned table will have one or (if no such worker pool is defined) zero rows.
- Mode: read
- Arguments:
page_size_in integer
page_offset_in integer
- Returns:
table
worker_pool_id text
provider_id text
previous_provider_ids jsonb
description text
config jsonb
created timestamptz
last_modified timestamptz
owner text
email_on_error boolean
provider_data jsonb
current_capacity integer
Get existing worker pools, ordered by worker_pool_id
. If the pagination arguments are both NULL, all rows are returned.
Otherwise, page_size rows are returned at offset page_offset.
- Mode: read
- Arguments:
worker_pool_id_in text
worker_group_in text
worker_id_in text
state_in text
page_size_in integer
page_offset_in integer
- Returns:
table
worker_pool_id text
worker_group text
worker_id text
provider_id text
created timestamptz
expires timestamptz
state text
capacity integer
last_modified timestamptz
last_checked timestamptz
Get existing workers (without their provider_data
) filtered by the optional arguments,
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.
- Mode: write
- Arguments:
worker_pool_id_in text
provider_id_in text
- Returns:
void
Remove the given provider_id from the worker pool's previous_provider_ids. It is not an error if the worker pool does not exist, or if the provider_id is not in the previous_provider_ids set.
- Mode: write
- Arguments:
worker_pool_id_in text
worker_group_in text
worker_id_in text
provider_id_in text
created_in timestamptz
expires_in timestamptz
state_in text
provider_data_in jsonb
capacity_in integer
last_modified_in timestamptz
last_checked_in timestamptz
etag_in uuid
secret_in jsonb
- Returns:
table
worker_pool_id text
worker_group text
worker_id text
provider_id text
created timestamptz
expires timestamptz
state text
provider_data jsonb
capacity integer
last_modified timestamptz
last_checked timestamptz
etag uuid
secret jsonb
Update a worker. Returns the up-to-date worker row that have the same worker_pool_id, worker_group, and worker_id. If the etag argument is empty then the update will overwrite the matched row. Else, the function will fail if the etag is out of date. This is useful for concurency handling.
- Mode: write
- Arguments:
worker_pool_id_in text
provider_id_in text
provider_data_in jsonb
- Returns:
void
Update the provider_data for the given provider_id in this worker pool. Note that this sets the provider_data property unconditionally, and it is up to the service to ensure that concurrent modifications do not occur. It is not an error if the worker pool does not exist.
- Mode: write
- Arguments:
worker_pool_id_in text
provider_id_in text
description_in text
config_in jsonb
last_modified_in timestamptz
owner_in text
email_on_error_in boolean
- Returns:
table
worker_pool_id text
provider_id text
description text
config jsonb
created timestamptz
last_modified timestamptz
owner text
email_on_error boolean
previous_provider_id text
current_capacity integer
Update API-accessible columns on an existig worker pool. All fields are overridden, but if the provider_id changes, then the existing provider_id is added to previous_provider_ids. The return value contains values required for an API response and previous_provider_id (singular) containing the provider_id found before the update. If no such worker pool exists, the return value is an empty set.