Skip to content

Commit

Permalink
dont create verification if status failed
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanSerikov authored and m-kus committed Oct 15, 2020
1 parent 0bca212 commit 088a34d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/compiler/verification.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import (
"fmt"

"github.com/baking-bad/bcdhub/internal/compiler/compilation"
"github.com/baking-bad/bcdhub/internal/database"
"github.com/baking-bad/bcdhub/internal/helpers"
Expand Down Expand Up @@ -95,6 +97,10 @@ func (ctx *Context) verify(ct compilation.Task) (*database.CompilationTask, erro
return nil, err
}

if status != compilation.StatusSuccess {
return nil, fmt.Errorf("verification for task_id %v failed", ct.ID)
}

return task, nil
}

Expand Down

0 comments on commit 088a34d

Please sign in to comment.