Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lzzzzl
/
golang_seo_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
57fd31c6
authored
Dec 08, 2020
by
lzzzzl
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
删除测试输出
parent
e586b1e2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
cmd/main.go
dal/function/fuction.go
cmd/main.go
View file @
57fd31c6
...
...
@@ -6,6 +6,9 @@ import (
"github.com/ichunt2019/golang-rbmq-sl/utils/rabbitmq"
"github.com/ichunt2019/logger"
"github.com/tidwall/gjson"
"golang.seo.server/collect/lxmain"
"golang.seo.server/collect/ly"
"golang.seo.server/collect/mip"
"golang.seo.server/common/ding"
"golang.seo.server/dal/db"
"golang.seo.server/dal/function"
...
...
@@ -124,9 +127,9 @@ func main() {
ding
.
Send
(
util
.
Configs
.
Ding_msg
.
Webhook
,
"SEO推送"
,
"任务启动"
,
mobile
,
isAtAll
)
time
.
Sleep
(
time
.
Duration
(
1
)
*
time
.
Hour
)
//
//
ly.RunLyTask(lyRemain, ConfigDir)
//
lxmain.RunMainTask(mainRemain, ConfigDir)
//
mip.RunMipTask(mipRemain, ConfigDir)
ly
.
RunLyTask
(
lyRemain
,
ConfigDir
)
lxmain
.
RunMainTask
(
mainRemain
,
ConfigDir
)
mip
.
RunMipTask
(
mipRemain
,
ConfigDir
)
}
dal/function/fuction.go
View file @
57fd31c6
...
...
@@ -146,14 +146,15 @@ func RegxUrl(url string) (res string) {
* @param
* @return
**/
func
InsertLog
(
urls
string
,
status
string
,
url
_t
ype
string
)
{
func
InsertLog
(
urls
string
,
status
string
,
url
T
ype
string
)
{
url
:=
strings
.
Split
(
urls
,
"
\n
"
)
for
i
:=
0
;
i
<
len
(
url
);
i
++
{
_
,
err1
:=
db
.
SeoDB
.
Exec
(
"INSERT INTO lie_url_log (url,status,url_type,create_time) VALUES (?,?,?,?)"
,
url
[
i
],
status
,
url
_t
ype
,
time
.
Now
()
.
Unix
())
url
[
i
],
status
,
url
T
ype
,
time
.
Now
()
.
Unix
())
if
err1
!=
nil
{
logger
.
Fatal
(
"数据库写入失败 url %s, status %d"
,
url
,
status
)
fmt
.
Println
(
"wrong"
)
}
}
}
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