Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vernemq
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stack
vernemq
Commits
276abdc1
Commit
276abdc1
authored
Nov 20, 2018
by
zCaesar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change word
parent
86ba1ce8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
10 deletions
+5
-10
authhook/auth_on_register.js
+1
-0
authhook/redis/node.txt
+0
-8
authhook/redis/on_offline.js
+2
-1
authhook/redis/on_register.js
+2
-1
No files found.
authhook/auth_on_register.js
View file @
276abdc1
...
...
@@ -107,6 +107,7 @@ module.exports = function (options = {}) {
if
(
result
)
{
require
(
'./redis/on_register'
).
on_register_redis
(
req
.
body
.
client_id
).
then
(
status
=>
{
console
.
log
(
'redis:status: '
+
status
)
require
(
'./redis/on_register'
).
deviceUsageCount
()
res
.
send
({
"result"
:
status
?
"ok"
:
"no"
});
...
...
authhook/redis/node.txt
deleted
100644 → 0
View file @
86ba1ce8
> 5k : 2msg
online_duration
last_checked
msg_count_real
msg_count_per_bit
msg_size
last_publish
\ No newline at end of file
authhook/redis/on_offline.js
View file @
276abdc1
...
...
@@ -30,6 +30,6 @@ function setValue(deviceid) {
function
deviceUsageCount
()
{
console
.
log
(
'device_usage_offline'
)
redis
.
hincrby
(
'_broker:1'
,
'device_
usag
e'
,
-
1
)
redis
.
hincrby
(
'_broker:1'
,
'device_
onlin
e'
,
-
1
)
}
module
.
exports
.
deviceUsageCount
=
deviceUsageCount
\ No newline at end of file
authhook/redis/on_register.js
View file @
276abdc1
...
...
@@ -33,6 +33,6 @@ function setValue(deviceid) {
function
deviceUsageCount
()
{
console
.
log
(
'device_usage_online'
)
redis
.
hincrby
(
'_broker:1'
,
'device_
usag
e'
,
1
)
redis
.
hincrby
(
'_broker:1'
,
'device_
onlin
e'
,
1
)
}
module
.
exports
.
deviceUsageCount
=
deviceUsageCount
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment