Developing lightweight computation at the DSG edge

Commit d4d8ca43 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[fetch] Print Antidote export process progress



Print on the terminal the progress of the export process. Ex.:

 10441 devices exported to AntidoteDB (10442 success, 0 fail)
Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parent 6ddc23c3
......@@ -260,12 +260,23 @@ func main() {
// }
// Export devices and their addresses to AntidoteDB
for _, v := range alldevices {
saveDeviceToAntidote(v.ID)
antidote_dev_succ := 0
antidote_dev_fail := 0
// antidote_add_succ := 0
// antidote_add_fail := 0
for k, v := range alldevices {
if saveDeviceToAntidote(v.ID) {
antidote_dev_succ++
} else {
antidote_dev_fail++
}
for _, w := range v.Interfaces {
saveDeviceIpv4ToAntidote(v.ID, w.Ipv4)
}
fmt.Printf("\r%d devices exported to AntidoteDB (%d success, %d fail)", k, antidote_dev_succ, antidote_dev_fail)
}
}
// Get an array with all the nodes in a zone and its subzones, recursively
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment