updated ipbl limit on ScanIP
This commit is contained in:
parent
c362158dfb
commit
632c4ba101
@ -104,7 +104,7 @@ func InsertIPBulk(cfg *config.Config, ips *[]IP) (numinsert int64, numupdate int
|
|||||||
func ScanIP(cfg *config.Config) (err error) {
|
func ScanIP(cfg *config.Config) (err error) {
|
||||||
for {
|
for {
|
||||||
orphans := []IP{}
|
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 {
|
for _, i := range orphans {
|
||||||
reverse, _ := i.UpdateRDNS()
|
reverse, _ := i.UpdateRDNS()
|
||||||
log.Printf("%s -> \"%s\"\n", i.IP, reverse)
|
log.Printf("%s -> \"%s\"\n", i.IP, reverse)
|
||||||
|
Loading…
Reference in New Issue
Block a user