Commit 276abdc1 by zCaesar

change word

parent 86ba1ce8
...@@ -107,6 +107,7 @@ module.exports = function (options = {}) { ...@@ -107,6 +107,7 @@ module.exports = function (options = {}) {
if (result) { if (result) {
require('./redis/on_register').on_register_redis(req.body.client_id).then(status => { require('./redis/on_register').on_register_redis(req.body.client_id).then(status => {
console.log('redis:status: ' + status) console.log('redis:status: ' + status)
require('./redis/on_register').deviceUsageCount()
res.send({ res.send({
"result": status ? "ok" : "no" "result": status ? "ok" : "no"
}); });
......
> 5k : 2msg
online_duration
last_checked
msg_count_real
msg_count_per_bit
msg_size
last_publish
\ No newline at end of file
...@@ -30,6 +30,6 @@ function setValue(deviceid) { ...@@ -30,6 +30,6 @@ function setValue(deviceid) {
function deviceUsageCount() { function deviceUsageCount() {
console.log('device_usage_offline') console.log('device_usage_offline')
redis.hincrby('_broker:1', 'device_usage', -1) redis.hincrby('_broker:1', 'device_online', -1)
} }
module.exports.deviceUsageCount = deviceUsageCount module.exports.deviceUsageCount = deviceUsageCount
\ No newline at end of file
...@@ -33,6 +33,6 @@ function setValue(deviceid) { ...@@ -33,6 +33,6 @@ function setValue(deviceid) {
function deviceUsageCount() { function deviceUsageCount() {
console.log('device_usage_online') console.log('device_usage_online')
redis.hincrby('_broker:1', 'device_usage', 1) redis.hincrby('_broker:1', 'device_online', 1)
} }
module.exports.deviceUsageCount = deviceUsageCount module.exports.deviceUsageCount = deviceUsageCount
\ No newline at end of file
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