Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CnChunfeng
/
crm_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
eb9591d1
authored
Sep 11, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整任务记录监听
parent
71524645
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
cmd/task/task_monitor/main.go
cmd/task/task_monitor/main.go
View file @
eb9591d1
...
...
@@ -45,19 +45,9 @@ func main() {
logger
.
InitLogger
(
"file"
,
logConfig
)
logger
.
Init
()
// 定时执行
ticker
:=
time
.
NewTicker
(
time
.
Minute
*
1
)
//ticker := time.NewTicker(time.Second * 5)
for
{
select
{
case
<-
ticker
.
C
:
fmt
.
Println
(
"ticker..."
)
go
updateOverTime
()
default
:
time
.
Sleep
(
time
.
Microsecond
*
100
)
}
}
updateOverTime
()
fmt
.
Println
(
"任务执行完成"
)
}
func
updateOverTime
()
{
...
...
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