Skip to content

Commit e33eea1

Browse files
committed
chore(api): address cleaner review feedback
- drop items.go line reference from RunOnce comment - promote stale-remove failure log from Warn to Error
1 parent f4e8023 commit e33eea1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/api/internal/sandbox/storage/redis

packages/api/internal/sandbox/storage/redis/cleaner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (c *Cleaner) Start(ctx context.Context) {
5858
func (c *Cleaner) RunOnce(ctx context.Context) error {
5959
var errs []error
6060

61-
// 1. globalExpirationSet: ExpiredItems internally ZREMs members whose sandbox JSON is gone (items.go:131-135).
61+
// 1. globalExpirationSet: ExpiredItems internally ZREMs members whose sandbox JSON is gone.
6262
// 2. evictExpired removes sandboxes whose EndTime is older than StaleCutoff;
6363
// recently expired ones are left to the evictor to avoid racing it.
6464
expired, err := c.storage.ExpiredItems(ctx)
@@ -89,7 +89,7 @@ func (c *Cleaner) evictExpired(ctx context.Context, expired []sandbox.Sandbox) {
8989
}
9090

9191
if rmErr := c.storage.Remove(context.WithoutCancel(ctx), sbx.TeamID, sbx.SandboxID); rmErr != nil {
92-
logger.L().Warn(ctx, "Cleaner failed to remove stale expired sandbox",
92+
logger.L().Error(ctx, "Cleaner failed to remove stale expired sandbox",
9393
zap.Error(rmErr),
9494
logger.WithSandboxID(sbx.SandboxID),
9595
logger.WithTeamID(sbx.TeamID.String()),

0 commit comments

Comments
 (0)