mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
f75cbab6ce
The AcquireProvisionerJob query only checked started_at IS NULL, allowing it to acquire jobs that were canceled while pending (which have completed_at set but started_at still NULL). Added completed_at IS NULL check to the query to prevent this. Also fixed JobCompleteBuilder.Do() in dbfake to set started_at when completing jobs to match production behavior. Fixes coder/internal#1323