Skip to content

Commit

Permalink
chore: fix ds-delete
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Aug 16, 2024
1 parent 707f516 commit 3a274e6
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions svc/pkg/ds/ops/server-delete/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,10 @@ pub async fn handle(
server_id = $1
AND delete_ts IS NULL
RETURNING
server_id,
datacenter_id
server_nomad.nomad_dispatched_job_id,
server_nomad.nomad_alloc_id,
FROM
db_ds.servers
JOIN
db_ds.server_nomad
ON
db_ds.servers.server_id = db_ds.server_nomad.server_id
server_id AS ds_server_id,
datacenter_id AS ds_datacenter_id,
(SELECT nomad_alloc_id FROM db_ds.server_nomad WHERE server_id = db_ds.servers.server_id) AS alloc_id,
(SELECT nomad_dispatched_job_id FROM db_ds.server_nomad WHERE server_id = db_ds.servers.server_id) AS dispatched_job_id
",
server_id,
ctx.ts(),
Expand Down

0 comments on commit 3a274e6

Please sign in to comment.