New and improved fault management
This introduces the concept of "channel". Presets may belong to different channels such that if one preset causes a fault, only presets belonging to the same channel will be paused. Presets in other channels will continue to be applied.
This commit is contained in:
1 parent
0a5697f06a
commit
67bcd7e526
7 files changed
+414
-132
No files matched your search
@@ -242,8 +242,9 @@ deleteDevice = (deviceId, callback) ->
|
||||
return callback(err) if err
|
||||
db.devicesCollection.remove({'_id' : deviceId}, (err) ->
|
||||
return callback(err) if err
|
||||
db.redisClient.del("#{deviceId}_presets_hash", "#{deviceId}_inform_hash", (err) ->
|
||||
callback(err)
|
||||
db.faultsCollection.remove({'_id' : {'$regex' : "^#{common.escapeRegExp(deviceId)}\\:"}}, (err) ->
|
||||
return callback(err) if err
|
||||
db.redisClient.del("#{deviceId}_presets_hash", "#{deviceId}_inform_hash", "#{deviceId}_faults", "#{deviceId}_no_tasks", callback)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user