lab5: очереди и асинхронная обработка изображений
Durable staging handoff, transactional outbox, at-least-once worker with lease fencing, idempotent versioned pipeline, three variants, operator tooling, contract tests and evidence. Includes the review fixes: reprocess source selection and failure settlement, replay guards, stale-job retirement, PNG structural/raster validation, migration rollback safety and audit events.
This commit is contained in:
@@ -91,6 +91,19 @@ func New(cfg Config) (*S3, error) {
|
||||
return st, nil
|
||||
}
|
||||
|
||||
func (s *S3) Ping(ctx context.Context) error {
|
||||
// HeadBucket needs bucket-level permissions that the application identity
|
||||
// intentionally does not have. A HeadObject on a sentinel staging key is
|
||||
// enough to prove connectivity and the object-level credentials; a missing
|
||||
// sentinel is the expected healthy result.
|
||||
_, err := s.Head(ctx, "staging/.health/ping")
|
||||
if err == nil || errors.Is(err, domain.ErrNotFound) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *S3) Put(
|
||||
ctx context.Context,
|
||||
key string,
|
||||
|
||||
Reference in New Issue
Block a user