Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
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
bp
goods
Commits
3fc91e61
Commit
3fc91e61
authored
Aug 28, 2021
by
mengweifu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:azkaban
parent
a964f76c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
39 deletions
+39
-39
assemble-job-config.sh
deploy/dockerfile/assemble-job-config.sh
+28
-0
start_job.sh
deploy/start_env/start_job.sh
+11
-25
start_job.sh
start_job.sh
+0
-14
No files found.
deploy/dockerfile/assemble-job-config.sh
0 → 100644
View file @
3fc91e61
#!/usr/bin/env bash
DIST_FILE_NAME
=
"*.tar.gz"
PROJECT_DIR
=
"api.go2yd.com"
START_SCRIPT
=
"./start_env/start_job.sh"
SYNC_DATA_OPERATIONS
=
"
tar zxf *.tar.gz -C start_env/api.go2yd.com/htdocs/Website
"
DEST_FILE_NAME
=
""
DEST_FILE_PATH
=
""
BASE_IMAGE
=
"docker2.yidian.com:5000/centos7/php72_without_nginx:20210621"
MAINTAINER
=
"mengweifu
\"
mengweifu@yidian-inc.com
\"
"
HOME_DIR
=
"/home/services"
LOG_DIRS
=
"
${
HOME_DIR
}
/
${
PROJECT_DIR
}
/logs
"
DATA_DIRS
=
"
"
deploy/start_env/start_job.sh
View file @
3fc91e61
...
...
@@ -6,14 +6,16 @@ fi
# 任务名称
if
[[
X
"
$2
"
==
X
""
]]
;
then
echo
"
task_
name cannot be empty"
echo
"
controller
name cannot be empty"
exit
1
fi
# method名称
if
[[
X
"
$3
"
==
X
""
]]
;
then
echo
"method name cannot be empty"
exit
1
fi
start_done_file
=
"/home/services/api.go2yd.com/logs/start_script.done"
rm
-f
${
start_done_file
}
environment
=
${
1
}
#php.ini要根据环境去修改
...
...
@@ -29,14 +31,6 @@ fi
rsyslogd
>
/dev/null 2>&1
#logrotate
cp
-f
/home/services/logrotate/logrotate-daemon.conf /etc/logrotate.d/goods-daemon.conf
#crontab
nohup
/usr/sbin/crond
>
crond.nohup &
crontab /home/services/crontab/crontab-daemon.conf
# ls | grep -v 'tuiyitui.*\|ini\|recipe\|unify_start_script.sh' | xargs rm -rf
if
[[
-e
"/usr/share/zoneinfo/Asia/Shanghai"
]]
;
then
ln
-sf
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
...
...
@@ -50,16 +44,8 @@ sysctl -w net.core.somaxconn=65535
php api.go2yd.com/htdocs/Website/public/job.php goodstoes index
"t=
$2
&n=
$3
&j=
$2
"
while
true
;
do
is_master_on
=
$(
pgrep
-fc
"
$2
$1
master process"
)
if
[[
${
is_master_on
}
-gt
0
]]
;
then
if
[[
!
-f
"
$start_done_file
"
]]
;
then
touch
${
start_done_file
}
fi
sleep
10
continue
else
exit
1
fi
done
if
[
$?
-ne
0
]
then
# todo
echo
"Build failed"
fi
start_job.sh
deleted
100755 → 0
View file @
a964f76c
# 运行环境env
if
[[
X
"
$1
"
==
X
""
]]
;
then
echo
"env cannot be empty"
exit
1
fi
# 任务名称
if
[[
X
"
$2
"
==
X
""
]]
;
then
echo
"task_name cannot be empty"
exit
1
fi
# goodstoes index
php public/job.php
$1
$2
\ No newline at end of file
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