Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6acf82

Browse files
committed
:||
1 parentd572dfa commite6acf82

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎coderd/provisionerdserver/provisionerdserver.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,15 +1452,16 @@ func (s *server) CompleteJob(ctx context.Context, completed *proto.CompletedJob)
14521452

14531453
// nolint:gocritic // Requires reading "system" files
14541454
file,err:=tx.GetFileByHashAndCreator(dbauthz.AsSystemRestricted(ctx), database.GetFileByHashAndCreatorParams{Hash:hash,CreatedBy:uuid.Nil})
1455-
iferr==nil {
1455+
switch {
1456+
caseerr==nil:
14561457
// This set of modules is already cached, which means we can reuse them
14571458
fileID= uuid.NullUUID{
14581459
Valid:true,
14591460
UUID:file.ID,
14601461
}
1461-
}elseif!xerrors.Is(err,sql.ErrNoRows) {
1462+
case!xerrors.Is(err,sql.ErrNoRows):
14621463
returnxerrors.Errorf("check for cached modules: %w",err)
1463-
}else {
1464+
default:
14641465
// nolint:gocritic // Requires creating a "system" file
14651466
file,err=tx.InsertFile(dbauthz.AsSystemRestricted(ctx), database.InsertFileParams{
14661467
ID:uuid.New(),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp