@@ 89,7 89,9 @@ func Length(db DB, action string) (int, error) {
return i, nil
}
-// RequeueExpired will re-add tasks to the queue when their TTL has expired
+// RequeueExpired will re-add tasks to the queue when their TTL has expired. Note that you do not have to call this function
+// manually unless you want to requeue immediately. Expired tasks are automatically requeued when a subsequent database operation is
+// performed. For very low traffic queues, you may want to call this periodically to limit worst case delay before requeue.
func RequeueExpired(db DB) (int, error) {
now := time.Now().Unix()
res, err := db.Exec("UPDATE queue SET expires = 0, tries = tries + 1 WHERE expires > 0 AND expires < ?", now)