fix ErrorOnlyArchiver logging Error, also when there is none
All checks were successful
go/archiver/pipeline/head This commit looks good

This commit is contained in:
Christian Schmied 2024-10-26 19:13:32 +02:00
parent 1449729882
commit 76c2a7be5e
Signed by: christian.schmied
GPG key ID: 5BD239286A047A18

View file

@ -9,10 +9,12 @@ func NewErrorOnlyArchiver(conf *Config) func(string, error) {
return func(filePath string, archiveErr error) { return func(filePath string, archiveErr error) {
if archiveErr != nil { if archiveErr != nil {
err := writeErrorFile(conf, filePath, archiveErr) err := writeErrorFile(conf, filePath, archiveErr)
if err != nil {
logger.Error(err) logger.Error(err)
} }
} }
} }
}
func writeErrorFile(conf *Config, filePath string, archiveErr error) error { func writeErrorFile(conf *Config, filePath string, archiveErr error) error {
if archiveErr != nil { if archiveErr != nil {