mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: Simplify provisionerd job acquire (#158)
This uses a simple channel to detect whether a job is running or not, and moves all cancels to be in goroutines.
This commit is contained in:
+10
-2
@@ -604,12 +604,20 @@ WHERE
|
||||
id = $1;
|
||||
|
||||
-- name: UpdateProvisionerJobByID :exec
|
||||
UPDATE
|
||||
provisioner_job
|
||||
SET
|
||||
updated_at = $2
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
-- name: UpdateProvisionerJobWithCompleteByID :exec
|
||||
UPDATE
|
||||
provisioner_job
|
||||
SET
|
||||
updated_at = $2,
|
||||
cancelled_at = $3,
|
||||
completed_at = $4,
|
||||
completed_at = $3,
|
||||
cancelled_at = $4,
|
||||
error = $5
|
||||
WHERE
|
||||
id = $1;
|
||||
|
||||
Reference in New Issue
Block a user