oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1ALTER TABLE runner_assignments ADD COLUMN protocol_version integer NOT NULL DEFAULT 1;
2UPDATE supervised_trials SET revoked_at=CURRENT_TIMESTAMP WHERE revoked_at IS NULL;
3UPDATE isolation_acknowledgements SET revoked_at=CURRENT_TIMESTAMP WHERE revoked_at IS NULL;
4INSERT INTO connection_invalidations(connection_id,revision,reason,at)
5 SELECT id,revision,'direct_launch_cutover',CURRENT_TIMESTAMP FROM connections;
6UPDATE connections SET revision=revision+1,reports_json='[]';
7UPDATE connection_choices SET revision=revision+1;
8UPDATE runner_assignments SET state='fenced',revision=revision+1 WHERE state!='contained';
9UPDATE steps SET fence=fence+1 WHERE id IN (SELECT step_id FROM attempts WHERE containment='pending');
10UPDATE attempts SET state='stopping',stop_requested=CURRENT_TIMESTAMP WHERE containment='pending';
11UPDATE jobs SET state='waiting',wait='uncertain_external_outcome',revision=revision+1 WHERE state NOT IN ('succeeded','failed','cancelled') OR id IN (SELECT job_id FROM attempts WHERE containment='pending');
12UPDATE task_outboxes SET state='reconcile' WHERE task_id IN (SELECT id FROM tasks WHERE state NOT IN ('merged','failed','cancelled','waiting_merge') OR job_id IN (SELECT job_id FROM attempts WHERE containment='pending'));
13UPDATE tasks SET state='waiting',wait_code='task.wait.reconcile',revision=revision+1 WHERE state NOT IN ('merged','failed','cancelled','waiting_merge') OR job_id IN (SELECT job_id FROM attempts WHERE containment='pending');
14INSERT INTO audit_events(actor,kind,record_id,at)
15 VALUES('system','system.migration.direct_launch','equipo/0018_direct_launch',CURRENT_TIMESTAMP);
16