diff --git a/src/models/ip.go b/src/models/ip.go index 8753066..f581176 100644 --- a/src/models/ip.go +++ b/src/models/ip.go @@ -104,7 +104,7 @@ func InsertIPBulk(cfg *config.Config, ips *[]IP) (numinsert int64, numupdate int func ScanIP(cfg *config.Config) (err error) { for { orphans := []IP{} - if cfg.Db.Where("rdns IS NULL").Asc("ip").Find(&orphans); len(orphans) > 0 { + if cfg.Db.Where("rdns IS NULL").Asc("ip").Limit(500).Find(&orphans); len(orphans) > 0 { for _, i := range orphans { reverse, _ := i.UpdateRDNS() log.Printf("%s -> \"%s\"\n", i.IP, reverse)