Skip to content

[BUG?] Task unicorn:reload sends reload signal even if Unicorn is cold-starting #55

@hron84

Description

@hron84

When Unicorn is not runing and unicorn:restart or unicorn:reload fires it up, it also sends a reload/restart signal to the Unicorn too, which causes Unicorn to fork, but after it the oldbin did not get a QUIT signal.

I think Cap should not do this.

Version: capistrano3-unicorn (0.2.1)
Codes (only relevant pieces):

# config/deploy.rb
set :unicorn_config_path, -> { "#{release_path}/config/unicorn.rb" }
set :unicorn_rack_env, -> { fetch(:rails_env, 'development') }

namespace :deploy do
  after :publishing, :restart

  task(:restart) { invoke 'unicorn:restart' }
  task(:stop) { invoke 'unicorn:stop' }

  after :finishing, "deploy:cleanup"
end

# Capfile

# Load DSL and set up stages
require 'capistrano/multiconfig'

# Include default deployment tasks
require 'capistrano/deploy'

require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets' # for asset handling add
require 'capistrano/rails/migrations' # for running migrations
require 'capistrano3/unicorn'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions