mirror of
https://github.com/hibiken/asynq.git
synced 2025-10-07 18:42:02 +08:00
don't archive if our max size is 0
This commit is contained in:
@@ -899,6 +899,9 @@ return redis.status_reply("OK")`)
|
||||
// Archive sends the given task to archive, attaching the error message to the task.
|
||||
// It also trims the archive by timestamp and set size.
|
||||
func (r *RDB) Archive(ctx context.Context, msg *base.TaskMessage, errMsg string) error {
|
||||
if *(r.config.MaxArchiveSize) <= 0 {
|
||||
return nil
|
||||
}
|
||||
var op errors.Op = "rdb.Archive"
|
||||
now := r.clock.Now()
|
||||
modified := *msg
|
||||
|
Reference in New Issue
Block a user