orbis/internal/modelschedule/queries.sql
kjuulh 2cdab4a1ab
All checks were successful
continuous-integration/drone/push Build is passing
feat: add worker distributor and model registry
2025-01-18 01:46:53 +01:00

19 lines
293 B
SQL

-- name: Ping :one
SELECT 1;
-- name: GetLast :one
SELECT last_run
FROM
model_schedules
WHERE
model_name = $1
LIMIT 1;
-- name: UpsertModel :exec
INSERT INTO model_schedules (model_name, last_run)
VALUES ($1, $2)
ON CONFLICT (model_name)
DO UPDATE SET
last_run = excluded.last_run;