Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
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
chenchuanwen
my-yaf-project
Commits
9e70eda2
Commit
9e70eda2
authored
Jan 03, 2019
by
chenchuanwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run
parent
6d4cdd48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
runRedisPush.php
scripts/crontab/push/runRedisPush.php
+8
-2
No files found.
scripts/crontab/push/runRedisPush.php
View file @
9e70eda2
...
@@ -59,6 +59,10 @@ class runRedisPush
...
@@ -59,6 +59,10 @@ class runRedisPush
$result
=
$redis
->
subscribe
(
array
(
'redisPublish'
),
array
(
$this
,
'callback'
));
$result
=
$redis
->
subscribe
(
array
(
'redisPublish'
),
array
(
$this
,
'callback'
));
}
}
protected
function
restart
(){
$this
->
stop
();
$this
->
start
();
}
private
function
stop
()
private
function
stop
()
{
{
...
@@ -72,7 +76,7 @@ class runRedisPush
...
@@ -72,7 +76,7 @@ class runRedisPush
private
function
help
(
$proc
)
private
function
help
(
$proc
)
{
{
printf
(
"%s start | stop | help
\n
"
,
$proc
);
printf
(
"%s start | stop | help
| restart | reload
\n
"
,
$proc
);
}
}
public
function
main
(
$argv
)
public
function
main
(
$argv
)
...
@@ -86,7 +90,9 @@ class runRedisPush
...
@@ -86,7 +90,9 @@ class runRedisPush
$this
->
stop
();
$this
->
stop
();
}
else
if
(
$argv
[
1
]
===
'start'
)
{
}
else
if
(
$argv
[
1
]
===
'start'
)
{
$this
->
start
();
$this
->
start
();
}
else
{
}
else
if
(
$argv
[
1
]
===
'restart'
){
$this
->
restart
();
}
else
{
$this
->
help
(
$argv
[
0
]);
$this
->
help
(
$argv
[
0
]);
}
}
}
}
...
...
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