Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
吴贤德
SooonerHotel
Commits
f3f7a8ad
Commit
f3f7a8ad
authored
Jul 29, 2019
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中心服务修改
parent
72f34e93
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
WasuChecker.go
Services/CenterService/Controller/WasuChecker.go
+3
-2
main.go
Services/CenterService/main.go
+3
-3
run.sh
Services/CenterService/run.sh
+3
-2
No files found.
Services/CenterService/Controller/WasuChecker.go
View file @
f3f7a8ad
...
@@ -2,6 +2,7 @@ package Controller
...
@@ -2,6 +2,7 @@ package Controller
import
(
import
(
log
"github.com/sirupsen/logrus"
log
"github.com/sirupsen/logrus"
"src/Common/DateTime"
"src/Common/Unit"
"src/Common/Unit"
"src/Config"
"src/Config"
"src/Model/Wasu"
"src/Model/Wasu"
...
@@ -29,8 +30,8 @@ func (this *WasuChecker) checkIncrementList() {
...
@@ -29,8 +30,8 @@ func (this *WasuChecker) checkIncrementList() {
log
.
Infoln
(
"WasuChecker.checkIncrementList Starting..."
)
log
.
Infoln
(
"WasuChecker.checkIncrementList Starting..."
)
mediaModel
:=
new
(
Wasu
.
MediaListModel
)
mediaModel
:=
new
(
Wasu
.
MediaListModel
)
mediaModel
.
Config
=
this
.
Config
mediaModel
.
Config
=
this
.
Config
//
date := DateTime.Format("YYYYMMDD", time.Now())
date
:=
DateTime
.
Format
(
"YYYYMMDD"
,
time
.
Now
())
date
:=
"20171213"
//
date:="20171213"
mediaList
:=
mediaModel
.
FetchList
(
date
,
1
)
mediaList
:=
mediaModel
.
FetchList
(
date
,
1
)
ok
:=
mediaModel
.
UpdateMediaList
(
mediaList
)
ok
:=
mediaModel
.
UpdateMediaList
(
mediaList
)
if
!
ok
{
if
!
ok
{
...
...
Services/CenterService/main.go
View file @
f3f7a8ad
...
@@ -19,9 +19,9 @@ func main() {
...
@@ -19,9 +19,9 @@ func main() {
configCHK
.
Start
()
configCHK
.
Start
()
//华数媒资拉取
//华数媒资拉取
//
wasuCHK := new (WasuChecker)
wasuCHK
:=
new
(
WasuChecker
)
//
wasuCHK.Config=config
wasuCHK
.
Config
=
config
//
wasuCHK.Start()
wasuCHK
.
Start
()
//合作方媒资推送
//合作方媒资推送
spCHK
:=
new
(
SpChecker
)
spCHK
:=
new
(
SpChecker
)
...
...
Services/CenterService/run.sh
View file @
f3f7a8ad
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#标准输出日志文件路径
#标准输出日志文件路径
LOG_PATH
=
"./nohup.log"
LOG_PATH
=
"./nohup.log"
#进程名
#进程名
PROGRAM
=
"Soooner
IMTraffic
"
PROGRAM
=
"Soooner
HotelCS
"
BAK_TIME
=
""
BAK_TIME
=
""
while
true
;
do
while
true
;
do
...
@@ -13,7 +13,8 @@ while true ; do
...
@@ -13,7 +13,8 @@ while true ; do
if
[
$PRO_NOW
-lt
1
]
;
then
if
[
$PRO_NOW
-lt
1
]
;
then
mv
$LOG_PATH
$LOG_PATH
.bak
$BAK_TIME
mv
$LOG_PATH
$LOG_PATH
.bak
$BAK_TIME
nohup
./
$PROGRAM
>
$LOG_PATH
2>&1 &
#nohup ./$PROGRAM > $LOG_PATH 2>&1 &
nohup
./
$PROGRAM
>
/dev/null 2>
$LOG_PATH
&
date
>>
./service_check.log
date
>>
./service_check.log
echo
"start1"
>>
./service_check.log
echo
"start1"
>>
./service_check.log
fi
fi
...
...
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