ЛР7 на 4: HTTPS, mTLS, OpenBao AppRole и ротация leaf.
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
-- name: CreateOutboxEntry :one
|
||||
INSERT INTO outbox (
|
||||
job_id,
|
||||
attachment_id,
|
||||
pipeline_version,
|
||||
attempt,
|
||||
available_at,
|
||||
traceparent,
|
||||
tracestate
|
||||
)
|
||||
SELECT
|
||||
job_id,
|
||||
id,
|
||||
pipeline_version,
|
||||
sqlc.arg(attempt)::int,
|
||||
sqlc.arg(available_at)::timestamptz,
|
||||
sqlc.arg(traceparent)::text,
|
||||
sqlc.arg(tracestate)::text
|
||||
FROM attachments
|
||||
WHERE id = sqlc.arg(attachment_id)::uuid
|
||||
AND job_id IS NOT NULL
|
||||
RETURNING *;
|
||||
|
||||
-- name: LockPendingOutboxEntries :many
|
||||
SELECT * FROM outbox
|
||||
WHERE published_at IS NULL
|
||||
AND available_at <= now()
|
||||
ORDER BY available_at, id
|
||||
LIMIT sqlc.arg(batch_size)::int
|
||||
FOR UPDATE SKIP LOCKED;
|
||||
|
||||
-- name: MarkOutboxPublished :execrows
|
||||
UPDATE outbox
|
||||
SET published_at = now()
|
||||
WHERE id = sqlc.arg(id)::bigint
|
||||
AND published_at IS NULL;
|
||||
Reference in New Issue
Block a user