Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pay
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
pay
Commits
018db4cc
Commit
018db4cc
authored
Jul 08, 2021
by
wanjilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 修正daemon文件缺少
parent
16cbd3b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
Daemon.php
application/modules/Cli/controllers/Daemon.php
+2
-2
crontab-daemon.conf
deploy/start_env/crontab/crontab-daemon.conf
+1
-0
start_daemon.sh
deploy/start_env/start_daemon.sh
+1
-1
No files found.
application/modules/Cli/controllers/Daemon.php
View file @
018db4cc
...
@@ -27,7 +27,7 @@ class DaemonController extends Cli
...
@@ -27,7 +27,7 @@ class DaemonController extends Cli
if
(
empty
(
$task_name
)){
if
(
empty
(
$task_name
)){
echo
<<<EOD
echo
<<<EOD
usage: php cli.php daemon run "t=
w
allet&n=2&j=sync_wallet"
usage: php cli.php daemon run "t=
W
allet&n=2&j=sync_wallet"
t daemo 脚本类名
t daemo 脚本类名
n 进程数
n 进程数
j 进程别名,默认同脚本类名
j 进程别名,默认同脚本类名
...
@@ -51,4 +51,4 @@ EOD;
...
@@ -51,4 +51,4 @@ EOD;
(
new
Daemon
(
$rename
,
$task_class
,
$worker_num
))
->
start
();
(
new
Daemon
(
$rename
,
$task_class
,
$worker_num
))
->
start
();
}
}
}
}
\ No newline at end of file
deploy/start_env/crontab/crontab-daemon.conf
0 → 100644
View file @
018db4cc
59
23
* * * /
usr
/
sbin
/
logrotate
/
etc
/
logrotate
.
conf
deploy/start_env/start_daemon.sh
View file @
018db4cc
...
@@ -56,7 +56,7 @@ php api.go2yd.com/htdocs/Website/public/cli.php Daemon run "t=$2&n=$3&j=$2"
...
@@ -56,7 +56,7 @@ php api.go2yd.com/htdocs/Website/public/cli.php Daemon run "t=$2&n=$3&j=$2"
while
true
;
do
while
true
;
do
is_master_on
=
$(
pgrep
-fc
"
$2
$1
master process
"
)
is_master_on
=
$(
pgrep
-fc
"
$2
"
)
if
[[
${
is_master_on
}
-gt
0
]]
;
then
if
[[
${
is_master_on
}
-gt
0
]]
;
then
if
[[
!
-f
"
$start_done_file
"
]]
;
then
if
[[
!
-f
"
$start_done_file
"
]]
;
then
touch
${
start_done_file
}
touch
${
start_done_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