mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 00:05:27 +00:00
Flow observes `suspend` setting and will wait for resume messages sent for the job before continuing to the next step in a flow. Adds endpoints under workspaces at `/jobs/<cancel|resume>/<job-uuid>` to either cancel or resume the job with a payload. For POST requests to the endpoint, payload is a JSON document. For GET requests to the endpoints, the payload is a base64url encoded JSON document as the value of the payload query parameter.
17 lines
609 B
SQL
17 lines
609 B
SQL
CREATE TABLE resume_job (
|
|
id uuid NOT NULL,
|
|
job uuid NOT NULL,
|
|
flow uuid NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
value JSONB NOT NULL DEFAULT 'null'::jsonb
|
|
CHECK (length(value::text) < 10 * 1024),
|
|
is_cancel boolean NOT NULL default false,
|
|
|
|
PRIMARY KEY (id),
|
|
FOREIGN KEY (flow) REFERENCES queue(id) ON DELETE CASCADE
|
|
);
|
|
|
|
ALTER TABLE queue
|
|
ADD COLUMN suspend INTEGER NOT NULL DEFAULT 0,
|
|
ADD COLUMN suspend_until TIMESTAMPTZ;
|