mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: compute job status as column (#10024)
* chore: provisioner job status as column * use provisioner job status for workspace searching
This commit is contained in:
@@ -718,7 +718,7 @@ func (b *Builder) checkTemplateJobStatus() error {
|
||||
}
|
||||
}
|
||||
|
||||
templateVersionJobStatus := db2sdk.ProvisionerJobStatus(*templateVersionJob)
|
||||
templateVersionJobStatus := codersdk.ProvisionerJobStatus(templateVersionJob.JobStatus)
|
||||
switch templateVersionJobStatus {
|
||||
case codersdk.ProvisionerJobPending, codersdk.ProvisionerJobRunning:
|
||||
msg := fmt.Sprintf("The provided template version is %s. Wait for it to complete importing!", templateVersionJobStatus)
|
||||
@@ -755,7 +755,7 @@ func (b *Builder) checkRunningBuild() error {
|
||||
if err != nil {
|
||||
return BuildError{http.StatusInternalServerError, "failed to fetch prior build", err}
|
||||
}
|
||||
if db2sdk.ProvisionerJobStatus(*job).Active() {
|
||||
if codersdk.ProvisionerJobStatus(job.JobStatus).Active() {
|
||||
msg := "A workspace build is already active."
|
||||
return BuildError{
|
||||
http.StatusConflict,
|
||||
|
||||
Reference in New Issue
Block a user