Developing lightweight computation at the DSG edge

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

[monitor-assign] Publish the maxDev value for each monitor


Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent a4d5dfb0
......@@ -137,6 +137,9 @@ func initialize() {
cnmlDevices = getCnmlDevicesList()
updateGlobalAssignationList()
// Publish the maxDev value for this monitor
updateMonitorMaxDevsInAntidote()
// Initialize periodic timers
initializeTimers()
......@@ -713,6 +716,11 @@ func updateMonitorTimestampInAntidote() {
fmt.Println("Setting timestamp to", timestamp)
}
func updateMonitorMaxDevsInAntidote() {
goclidote.AntidoteSetRegisterInBucket("guifi", fmt.Sprintf("%s_maxdevs", maxDevs), fmt.Sprintf("%d", maxDevs), dbHost, dbPort)
fmt.Println("Setting capacity to", maxDevs)
}
// Deregister a monitor from AntidoteDB (e.g., on exit, or on crash)
func deregisterMonitorInAntidote(monitorID string) {
......
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