feat: Add parameter and jobs database schema#81
Conversation
1122da1 to
20dd41e
Compare
This modifies a prior migration which is typically forbidden, but because we're pre-production deployment I felt grouping would be helpful to future contributors. This adds database functions that are required for the provisioner daemon and job queue logic.
20dd41e to
48527f7
Compare
Codecov Report
@@ Coverage Diff @@
## main #81 +/- ##
==========================================
+ Coverage 71.84% 71.87% +0.02%
==========================================
Files 88 88
Lines 3417 3417
Branches 55 55
==========================================
+ Hits 2455 2456 +1
+ Misses 753 752 -1
Partials 209 209
Continue to review full report at Codecov.
|
| UPDATE | ||
| SKIP LOCKED |
There was a problem hiding this comment.
question (non-blocking): Just curious why this is necessary?
There was a problem hiding this comment.
Added the following comment:
-- Acquires the lock for a single job that isn't started, completed,
-- cancelled, and that matches an array of provisioner types.
--
-- SKIP LOCKED is used to jump over locked rows. This prevents
-- multiple provisioners from acquiring the same jobs. See:
-- https://www.postgresql.org/docs/9.5/sql-select.html#SQL-FOR-UPDATE-SHAREThere was a problem hiding this comment.
Excellent, thank you!
bryphe-coder
left a comment
There was a problem hiding this comment.
LGTM 👍
This modifies a prior migration which is typically forbidden,
Seems OK while we're marching towards black-triangle, and there is no production deployment at all yet
This modifies a prior migration which is typically forbidden,
but because we're pre-production deployment I felt grouping
would be helpful to future contributors.
This adds database functions that are required for the provisioner
daemon and job queue logic.