updated lock to ipbl
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Paul 2021-12-28 00:14:53 +01:00
parent c5ab1fad2d
commit 826c906777

View File

@ -66,6 +66,7 @@ func InsertIPBulk(cfg *config.Config, ips *[]IP) (numinserts int64, numfail int6
func ScanIP(cfg *config.Config, lock *bool) (err error) { func ScanIP(cfg *config.Config, lock *bool) (err error) {
if !*lock { if !*lock {
*lock = true
for { for {
var orphans = []IP{} var orphans = []IP{}
cfg.Db.Where("rdns IS NULL").Asc("ip").Find(&orphans) cfg.Db.Where("rdns IS NULL").Asc("ip").Find(&orphans)