Drain the ticket embedding outbox and sweep the embedding cache (every 10 minutes) — cronembeddingdrain
POST
/cron/embedding-drain
const url = 'https://example.com/api/cron/embedding-drain';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/cron/embedding-drainSame run as POST /api/admin/seed-ticket-embeddings: seeds jobs for tickets with no vector, claims, embeds and settles them, then sweeps the durable embedding cache. ok is false when the run is red: a new unacknowledged dead letter, due unleased jobs with none completed, or no job completed while the oldest waiting job is past the age limit. An outbox or cache-sweep failure answers 500. Protected by CRON_SECRET via the x-cron-secret header. Scheduled by the pg_cron embedding-drain job.
Responses
Section titled “ Responses ”Run result
Media type application/json
object
ok
required
boolean
claimed
integer
embedded
integer
unchanged
integer
failed
integer
deadLettered
integer
refused
integer
stopped
string
new_dead_letters
required
integer
due_unleased_pending
required
integer
completed_this_run
required
integer
oldest_job_age_s
integer | null
cache_swept
required
integer
error
string
key
additional properties
any
Missing or invalid CRON_SECRET
Outbox or cache-sweep failure