Fork me on GitHub
#proletarian
<
2023-04-03
>
emccue16:04:08

changing the table spec

CREATE TABLE IF NOT EXISTS job (
    job_id      UUID PRIMARY KEY,   -- job id, generated and returned by proletarian.job/enqueue!
    queue       TEXT      NOT NULL, -- queue name
    job_type    TEXT      NOT NULL, -- job type
    payload     TEXT      NOT NULL, -- Transit-encoded job data
    attempts    INTEGER   NOT NULL DEFAULT 0, -- Number of attempts. Starts at 0. Increments when the job is processed.
    enqueued_at TIMESTAMP NOT NULL DEFAULT NOW(), -- When the job was enqueued (never changes)
    process_at  TIMESTAMP NOT NULL DEFAULT NOW()  -- When the job should be run (updates every retry)
);
so its a tad more friendly to triggers

👍 2