Skip to content

Commit

Permalink
Add stop timeout to systemd services
Browse files Browse the repository at this point in the history
  • Loading branch information
krissi committed May 12, 2016
1 parent 1f96da0 commit 42a2bcc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/export/systemd/process.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n
KillMode=process
TimeoutStopSec=<%= engine.options[:timeout] %>
1 change: 1 addition & 0 deletions lib/foreman/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def start(process=nil)
method_option :user, :type => :string, :aliases => "-u"
method_option :template, :type => :string, :aliases => "-t"
method_option :concurrency, :type => :string, :aliases => "-c", :banner => '"alpha=5,bar=3"', :desc => 'Specify what processes will run and how many. Default: "all=1"'
method_option :timeout, :type => :numeric, :aliases => "-t", :desc => "Specify the amount of time (in seconds) processes have to shutdown gracefully before receiving a SIGKILL, defaults to 5."

def export(format, location=nil)
check_procfile!
Expand Down
1 change: 1 addition & 0 deletions spec/resources/export/systemd/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n
KillMode=process
TimeoutStopSec=5
1 change: 1 addition & 0 deletions spec/resources/export/systemd/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=%n
KillMode=process
TimeoutStopSec=5

0 comments on commit 42a2bcc

Please sign in to comment.