Developing lightweight computation at the DSG edge

Commit 5d2fc158 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[monitor-assign] Sort conditions for legibility


Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent 408ebb89
......@@ -444,7 +444,7 @@ func reassignDevs() {
// Create a list with all the unassigned devices
var unassignedDevices []cnml.DeviceIpv4sGraphserver
for _, v := range cnmlDevices {
if (!isDeviceInAssignationSlice(v.ID, globalAssign) || len(globalAssign[posDeviceInAssignationSlice(v.ID, globalAssign)].MonitorID) < minMons) && !isDeviceInAssignationSlice(v.ID, localAssign) {
if !isDeviceInAssignationSlice(v.ID, localAssign) && (!isDeviceInAssignationSlice(v.ID, globalAssign) || len(globalAssign[posDeviceInAssignationSlice(v.ID, globalAssign)].MonitorID) < minMons) {
unassignedDevices = append(unassignedDevices, v)
}
}
......
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