Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Jan 17, 2025
1 parent d9f54e3 commit 19c119e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gateway/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ func (c *Gateway) cacheManifest(info *PathInfo) (int, error) {
msg := fmt.Sprintf("%s/%s@%s", info.Host, info.Image, digest)
_, err := c.queueClient.Create(context.Background(), msg, 0)
if err != nil {
c.logger.Warn("failed add message to queue", "msg", msg, "error", err)
c.logger.Warn("failed add message to queue", "msg", msg, "tag", info.Manifests, "error", err)
} else {
c.logger.Info("Add message to queue", "msg", msg, "digest", digest)
c.logger.Info("Add message to queue", "msg", msg, "tag", info.Manifests)
}
digest = cachedDigest
}
Expand Down
2 changes: 1 addition & 1 deletion queue/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (c *MessageClient) Create(ctx context.Context, content string, priority int
}
defer resp.Body.Close()

if resp.StatusCode != http.StatusCreated {
if resp.StatusCode != http.StatusCreated && resp.StatusCode != http.StatusOK {
return MessageResponse{}, handleErrorResponse(resp)
}

Expand Down

0 comments on commit 19c119e

Please sign in to comment.