Developing lightweight computation at the DSG edge

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

[monitor-assign] Update function checkOutdatedLocalDevices()



By now remains unused.
Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent 7e38fcaa
......@@ -438,15 +438,15 @@ func reassignDevs() {
// // Check for devices assigned locally that are no longer in the global devices list
// func checkOutdatedLocalDevices() {
//
// assgnchanges := false // Track changes in the assignation list
// var deldevs []cnml.DeviceIpv4sGraphserver // Storage for the deleted devices
// newlocalAssign := localAssign // Duplicate the local list of assigned devices
// assgnchanges := false // Track changes in the assignation list
// var deldevs []cnml.DeviceMonitorAssignation // Storage for the deleted devices
// newlocalAssign := localAssign // Duplicate the local list of assigned devices
//
// for _, v := range localAssign {
// if !isDeviceInSlice(v, cnmlDevices) {
// fmt.Println("Removing old device ", v.ID, " from the local assigned devices list")
// if !isDeviceInSliceByID(v.Device.ID, cnmlDevices) {
// fmt.Println("Removing old device ", v.Device.ID, " from the local assigned devices list")
// deldevs = append(deldevs, v)
// newlocalAssign = rmDeviceFromSlice(v, newlocalAssign)
// newlocalAssign = rmDeviceFromAssignationList(v.Device.ID, newlocalAssign)
// assgnchanges = true
// }
// }
......@@ -455,7 +455,7 @@ func reassignDevs() {
// if assgnchanges {
// localAssign = newlocalAssign
// for _, v := range deldevs {
// goclidote.AntidoteRemoveItemFromSetInBucket(fmt.Sprintf("device-%d", v.ID), "monitors", ID, dbHost, dbPort)
// goclidote.AntidoteRemoveItemFromSetInBucket(fmt.Sprintf("device-%d", v.Device.ID), "monitors", ID, dbHost, dbPort)
// }
// }
// }
......
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