Builder_db.Job_tag.add: use INSERT OR REPLACE to avoid constraint violation
This commit is contained in:
parent
9a271add7b
commit
eb786088e7
3 changed files with 3 additions and 3 deletions
|
@ -75,7 +75,7 @@ let infer_section_and_synopsis artifacts =
|
|||
if OpamPackage.Set.exists (fun p -> OpamPackage.Name.equal p.OpamPackage.name influx)
|
||||
switch.OpamFile.SwitchExport.selections.OpamTypes.sel_installed
|
||||
then
|
||||
"Unikernel (monitoring)"
|
||||
"Unikernel (with metrics reported to Influx)"
|
||||
else
|
||||
"Unikernel"
|
||||
in
|
||||
|
|
|
@ -157,7 +157,7 @@ module Job_tag = struct
|
|||
let add =
|
||||
Caqti_request.exec
|
||||
Caqti_type.(tup3 id string id)
|
||||
"INSERT INTO job_tag (tag, value, job) VALUES (?, ?, ?)"
|
||||
"INSERT OR REPLACE INTO job_tag (tag, value, job) VALUES (?, ?, ?)"
|
||||
|
||||
let get_value =
|
||||
Caqti_request.find
|
||||
|
|
|
@ -209,7 +209,7 @@ let infer_section_and_synopsis artifacts =
|
|||
if OpamPackage.Set.exists (fun p -> OpamPackage.Name.equal p.OpamPackage.name influx)
|
||||
switch.OpamFile.SwitchExport.selections.OpamTypes.sel_installed
|
||||
then
|
||||
"Unikernel (monitoring)"
|
||||
"Unikernel (with metrics reported to Influx)"
|
||||
else
|
||||
"Unikernel"
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue