mirror of
https://github.com/hibiken/asynq.git
synced 2025-04-19 23:30:20 +08:00
warn user when they set a big number of janitor batch size
This commit is contained in:
parent
0db497a8e0
commit
b4676d1af5
@ -554,6 +554,10 @@ func NewServer(r RedisConnOpt, cfg Config) *Server {
|
||||
if janitorBatchSize == 0 {
|
||||
janitorBatchSize = defaultJanitorBatchSize
|
||||
}
|
||||
if janitorBatchSize > defaultJanitorBatchSize {
|
||||
logger.Warnf("Janitor batch size of %d is greater than the recommended batch size of %d. "+
|
||||
"This might cause a long-running script", janitorBatchSize, defaultJanitorBatchSize)
|
||||
}
|
||||
janitor := newJanitor(janitorParams{
|
||||
logger: logger,
|
||||
broker: rdb,
|
||||
|
Loading…
x
Reference in New Issue
Block a user