Skip to content

Commit

Permalink
feat: fix duration logic for the flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ugurcanerdogan committed Jul 5, 2024
1 parent 4c33550 commit d46441e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@ func (s *cronsumer) startConsume(cfg kafka.ConsumerConfig) {

go s.consumer.Listen(ctx, cfg.BackOffStrategy.String(), &cancelFuncWrapper)

time.AfterFunc(cfg.Duration, cancelFuncWrapper)
if !cfg.DisableExceptionCron {
time.AfterFunc(cfg.Duration, cancelFuncWrapper)
}
}

0 comments on commit d46441e

Please sign in to comment.