Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

delegatedTaskMessage.ts

9 lines486 Bytes

1/**
2 * A user message that marks its run as a monitor update or a delegated-completion wake: what
3 * `delegatedTaskProgress` and `delegatedTaskRuns` read. The partial index on it is only used when
4 * the read spells this text the same way.
5 */
6export const DELEGATED_TASK_MESSAGE_CONDITION = `role = 'user' AND json_valid(payload_json) AND (
7 json_extract(payload_json, '$.notification.source.kind') = 'monitor'
8 OR json_extract(payload_json, '$.delegatedCompletion') IS NOT NULL
9)`;