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

Commitd2faab0

Browse files
committed
Fixed#27260 Use NewArtifactStoreWithEventCallback
Signed-off-by: ByoungUk Lee <nimdrak@gmail.com>
1 parent4d4c01c commitd2faab0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎libpod/runtime.go‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,15 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
531531

532532
// Using sync once value to only init the store exactly once and only when it will be actually be used.
533533
runtime.ArtifactStore=sync.OnceValues(func() (*artStore.ArtifactStore,error) {
534-
returnartStore.NewArtifactStore(filepath.Join(runtime.storageConfig.GraphRoot,"artifacts"),runtime.SystemContext())
534+
artifactEventCallBack:=func(status,name,digeststring,attributesmap[string]string) {
535+
eventStatus,err:=events.StringToStatus(status)
536+
iferr!=nil {
537+
logrus.Errorf("Unknown artifact event status %q: %v",status,err)
538+
return
539+
}
540+
runtime.NewArtifactEvent(eventStatus,name,digest,attributes)
541+
}
542+
returnartStore.NewArtifactStoreWithEventCallback(filepath.Join(runtime.storageConfig.GraphRoot,"artifacts"),runtime.SystemContext(),artifactEventCallBack)
535543
})
536544
}
537545

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp