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:
Zaid Abdulla committed 2016-08-23 01:06:25 -07:00
1 parent 0a5697f06a
commit 67bcd7e526
7 files changed
+414 -132

No files matched your search

+3 -2
View File
@@ -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)
)
)
)