Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-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
602ef24d
authored
Sep 14, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整发票公司脚本
parent
c0c4dfc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
user/company/main.go
user/company/main.go
View file @
602ef24d
...
...
@@ -51,18 +51,9 @@ func main() {
//初始化db
initDb
(
util
.
Configs
.
Liexin_databases
.
Dns
)
//t1 := time.NewTimer(time.Second * 10)
t1
:=
time
.
NewTimer
(
time
.
Hour
*
12
)
// 定时12小时
for
{
select
{
case
<-
t1
.
C
:
fmt
.
Println
(
"ticker..."
)
updateData
()
//t1.Reset(time.Second * 10)
t1
.
Reset
(
time
.
Hour
*
12
)
}
}
updateData
()
fmt
.
Println
(
"任务执行成功"
)
}
// 修改DB
...
...
@@ -129,6 +120,7 @@ func updateData() (err error) {
}
row
.
Close
()
return
}
...
...
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