mirror of
https://github.com/Xevion/scla-unsubscribe.git
synced 2025-12-08 04:08:27 -06:00
Lower warn log level, skip empty emails
This commit is contained in:
@@ -345,7 +345,7 @@ func GetFullEntryCached(id string) (*FullEntry, error) {
|
|||||||
|
|
||||||
// Check if key was found
|
// Check if key was found
|
||||||
if err == badger.ErrKeyNotFound {
|
if err == badger.ErrKeyNotFound {
|
||||||
log.Warn().Str("key", key).Msg("Entry Cache Not Found")
|
log.Debug().Str("key", key).Msg("Entry Cache Not Found")
|
||||||
return nil
|
return nil
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return errors.Wrap(err, "failed to get entry cache")
|
return errors.Wrap(err, "failed to get entry cache")
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -170,6 +170,10 @@ func main() {
|
|||||||
log.Fatal().Err(err).Msg("Failed to get full entry")
|
log.Fatal().Err(err).Msg("Failed to get full entry")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if fullEntry.Email == "" {
|
||||||
|
log.Warn().Str("name", fullEntry.Name).Msg("Entry has no email")
|
||||||
|
continue
|
||||||
|
}
|
||||||
log.Debug().Str("name", fullEntry.Name).Str("email", fullEntry.Email).Msg("Entry Processed")
|
log.Debug().Str("name", fullEntry.Name).Str("email", fullEntry.Email).Msg("Entry Processed")
|
||||||
entries <- fullEntry.Email
|
entries <- fullEntry.Email
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user