mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(irc): add indexer disabled warn log (#1381)
* feat(logs): add indexer enabled check for announce * logs: update announce.go --------- Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
parent
0c65231626
commit
cc9656cd41
1 changed files with 7 additions and 1 deletions
|
@ -29,7 +29,7 @@ type announceProcessor struct {
|
|||
|
||||
func NewAnnounceProcessor(log zerolog.Logger, releaseSvc release.Service, indexer *domain.IndexerDefinition) Processor {
|
||||
ap := &announceProcessor{
|
||||
log: log.With().Str("module", "announce_processor").Logger(),
|
||||
log: log.With().Str("module", "announce_processor").Str("indexer", indexer.Name).Str("network", indexer.IRC.Network).Logger(),
|
||||
releaseSvc: releaseSvc,
|
||||
indexer: indexer,
|
||||
}
|
||||
|
@ -75,8 +75,13 @@ func (a *announceProcessor) processQueue(queue chan string) {
|
|||
a.log.Error().Err(err).Msg("could not get line from queue")
|
||||
return
|
||||
}
|
||||
|
||||
a.log.Trace().Msgf("announce: process line: %v", line)
|
||||
|
||||
if !a.indexer.Enabled {
|
||||
a.log.Warn().Msgf("indexer %v disabled", a.indexer.Name)
|
||||
}
|
||||
|
||||
// check should ignore
|
||||
|
||||
match, err := indexer.ParseLine(&a.log, parseLine.Pattern, parseLine.Vars, tmpVars, line, parseLine.Ignore)
|
||||
|
@ -131,6 +136,7 @@ func (a *announceProcessor) AddLineToQueue(channel string, line string) error {
|
|||
}
|
||||
|
||||
queue <- line
|
||||
|
||||
a.log.Trace().Msgf("announce: queued line: %v", line)
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue