mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-08-29 04:06:58 +00:00
try and recover from panic?
This commit is contained in:
@@ -192,6 +192,11 @@ func (s *ManifestStore) Put(ctx context.Context, manifest distribution.Manifest,
|
||||
// Do this asynchronously to avoid blocking the push
|
||||
if tag != "" && s.ctx.ServiceToken != "" && s.ctx.Handle != "" {
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
slog.Error("Panic in notifyHoldAboutManifest", "panic", r)
|
||||
}
|
||||
}()
|
||||
if err := s.notifyHoldAboutManifest(context.Background(), manifestRecord, tag, dgst.String()); err != nil {
|
||||
slog.Warn("Failed to notify hold about manifest", "error", err)
|
||||
}
|
||||
@@ -201,6 +206,11 @@ func (s *ManifestStore) Put(ctx context.Context, manifest distribution.Manifest,
|
||||
// Refresh README cache asynchronously if manifest has io.atcr.readme annotation
|
||||
// This ensures fresh README content is available on repository pages
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
slog.Error("Panic in refreshReadmeCache", "panic", r)
|
||||
}
|
||||
}()
|
||||
s.refreshReadmeCache(context.Background(), manifestRecord)
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user