Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
capistrano-sneakers
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
capistrano-sneakers
Commits
45fecff2
Commit
45fecff2
authored
Mar 11, 2015
by
Karl Kloppenborg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow run_config stop and quiet
parent
52c10099
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
lib/capistrano/tasks/sneakers.rb
+11
-8
No files found.
lib/capistrano/tasks/sneakers.rb
View file @
45fecff2
...
...
@@ -63,19 +63,23 @@ namespace :sneakers do
end
def
stop_sneakers
(
pid_file
)
if
fetch
(
:stop_sneakers_in_background
,
fetch
(
:sneakers_run_in_background
))
if
fetch
(
:sneakers_use_signals
)
background
"kill -TERM `cat
#{
pid_file
}
`"
if
fetch
(
:sneakers_run_config
)
==
true
execute
"kill -SIGTERM `cat
#{
pid_file
}
`"
else
if
fetch
(
:stop_sneakers_in_background
,
fetch
(
:sneakers_run_in_background
))
if
fetch
(
:sneakers_use_signals
)
background
"kill -TERM `cat
#{
pid_file
}
`"
else
background
:bundle
,
:exec
,
:sneakersctl
,
'stop'
,
"
#{
pid_file
}
"
,
fetch
(
:sneakers_timeout
)
end
else
background
:bundle
,
:exec
,
:sneakersctl
,
'stop'
,
"
#{
pid_file
}
"
,
fetch
(
:sneakers_timeout
)
execute
:bundle
,
:exec
,
:sneakersctl
,
'stop'
,
"
#{
pid_file
}
"
,
fetch
(
:sneakers_timeout
)
end
else
execute
:bundle
,
:exec
,
:sneakersctl
,
'stop'
,
"
#{
pid_file
}
"
,
fetch
(
:sneakers_timeout
)
end
end
def
quiet_sneakers
(
pid_file
)
if
fetch
(
:sneakers_use_signals
)
if
fetch
(
:sneakers_use_signals
)
||
fetch
(
:sneakers_run_config
)
background
"kill -USR1 `cat
#{
pid_file
}
`"
else
begin
...
...
@@ -88,7 +92,6 @@ namespace :sneakers do
end
def
start_sneakers
(
pid_file
,
idx
=
0
)
args
=
[]
if
fetch
(
:sneakers_run_config
)
==
true
# Use sneakers configuration prebuilt in
raise
"[ set :workers, ['worker1', 'workerN'] ] not configured properly, please configure the workers you wish to use"
if
fetch
(
:sneakers_workers
).
nil?
or
fetch
(
:sneakers_workers
)
==
false
or
!
fetch
(
:sneakers_workers
).
kind_of?
Array
...
...
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