Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
node-monitor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟@五瓣科技
node-monitor
Commits
a8f7589d
Commit
a8f7589d
authored
Apr 28, 2022
by
w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ticker time
parent
22cfb9c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
main.go
main.go
+1
-1
ticker.go
ticker.go
+4
-4
No files found.
main.go
View file @
a8f7589d
...
@@ -22,7 +22,7 @@ func init() {
...
@@ -22,7 +22,7 @@ func init() {
var
rootCmd
=
&
cobra
.
Command
{
var
rootCmd
=
&
cobra
.
Command
{
Use
:
"node-monitor"
,
Use
:
"node-monitor"
,
Short
:
"monitor
halle
chain"
,
Short
:
"monitor
cmp
chain"
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
cli
,
err
:=
NewClient
(
nodeRpc
)
cli
,
err
:=
NewClient
(
nodeRpc
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
ticker.go
View file @
a8f7589d
...
@@ -112,11 +112,11 @@ func (t *TimerTicker) timeoutRoutine() {
...
@@ -112,11 +112,11 @@ func (t *TimerTicker) timeoutRoutine() {
switch
count
{
switch
count
{
case
1
:
case
1
:
t
.
ticker
=
time
.
NewTicker
(
time
.
Minute
)
t
.
ticker
=
time
.
NewTicker
(
5
*
time
.
Minute
)
case
2
:
t
.
ticker
=
time
.
NewTicker
(
35
*
time
.
Minute
)
case
3
:
case
3
:
t
.
ticker
=
time
.
NewTicker
(
10
*
time
.
Minute
)
t
.
ticker
=
time
.
NewTicker
(
95
*
time
.
Minute
)
case
6
:
t
.
ticker
=
time
.
NewTicker
(
time
.
Hour
)
}
}
t
.
Logger
.
Debug
(
"send msg."
,
"times"
,
count
)
t
.
Logger
.
Debug
(
"send msg."
,
"times"
,
count
)
...
...
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