Skip to content

Commit

Permalink
Merge pull request #181 from sul-dlss/resque-pool
Browse files Browse the repository at this point in the history
Replace robots-controller with resque-pool
  • Loading branch information
justinlittman authored Apr 12, 2019
2 parents f151416 + dd8b12c commit 5c85bee
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 130 deletions.
3 changes: 1 addition & 2 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ require 'capistrano/bundler'
# require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
require 'capistrano/honeybadger'
require 'whenever/capistrano'
require 'dlss/capistrano'
require 'capistrano/shared_configs'
require 'capistrano-resque-pool'

# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ gem 'lyber-core', '~> 4.0', '>= 4.0.3'
gem 'pry', '~> 0.10' # for console
gem 'rake'
gem 'rgeoserver', '~> 0.10'
gem 'robot-controller', '~> 2.0', '>= 2.0.4' # requires Resque
gem 'rsolr'
gem 'slop', '~> 3.6' # for bin/run_robot
gem 'whenever'
gem 'honeybadger'
gem 'geo_combine'
gem 'net-http-persistent', '~> 3.0'
gem 'activemodel', '~> 5.1', '< 5.2' # due to https://github.com/sul-dlss/gis-robot-suite/issues/174
gem 'resque'
gem 'resque-pool'

group :development do
gem 'rspec'
Expand All @@ -28,6 +28,7 @@ group :deployment do
gem 'capistrano'
gem 'capistrano-rvm'
gem 'capistrano-bundler'
gem 'capistrano-resque-pool'
gem 'dlss-capistrano'
gem 'capistrano-shared_configs'
end
25 changes: 9 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ GEM
mini_exiftool
nokogiri
ast (2.4.0)
blue-daemons (1.1.11)
bluepill (0.1.3)
activesupport (>= 3.2, < 6)
blue-daemons (~> 1.1)
state_machine (~> 1.1)
builder (3.2.3)
bundler-audit (0.6.1)
bundler (>= 1.2.0, < 3)
Expand All @@ -53,11 +48,13 @@ GEM
capistrano (~> 3.1)
capistrano-one_time_key (0.1.0)
capistrano (~> 3.0)
capistrano-resque-pool (0.1.2)
capistrano
resque-pool
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano-shared_configs (0.2.2)
chronic (0.10.2)
coderay (1.1.2)
concurrent-ruby (1.1.5)
confstruct (0.2.7)
Expand Down Expand Up @@ -245,6 +242,9 @@ GEM
redis-namespace (~> 1.3)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
resque-pool (0.7.0)
rake (>= 10.0, < 13.0)
resque (>= 1.22, < 3)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
Expand All @@ -263,11 +263,6 @@ GEM
rgeo (~> 0.5.3)
rgeo-shapefile (~> 0.4.1)
rubyzip
robot-controller (2.1.1)
bluepill
rake (>= 10.3)
resque (~> 1.26)
whenever (~> 0.9.2)
rsolr (2.2.1)
builder (>= 2.1.2)
faraday (>= 0.9.0)
Expand Down Expand Up @@ -334,7 +329,6 @@ GEM
mods (~> 2.2)
stanford-mods-normalizer (0.1.0)
nokogiri (~> 1.8)
state_machine (1.2.0)
stomp (1.4.8)
systemu (2.6.5)
temple (0.8.1)
Expand All @@ -353,8 +347,6 @@ GEM
unicode-display_width (1.5.0)
vegas (0.1.11)
rack (>= 1.0.0)
whenever (0.9.7)
chronic (>= 0.6.3)
xml-simple (1.1.5)

PLATFORMS
Expand All @@ -365,6 +357,7 @@ DEPENDENCIES
assembly-objectfile
capistrano
capistrano-bundler
capistrano-resque-pool
capistrano-rvm
capistrano-shared_configs
coveralls
Expand All @@ -378,14 +371,14 @@ DEPENDENCIES
net-http-persistent (~> 3.0)
pry (~> 0.10)
rake
resque
resque-pool
rgeoserver (~> 0.10)
robot-controller (~> 2.0, >= 2.0.4)
rsolr
rspec
rubocop (~> 0.52.1)
rubocop-rspec
slop (~> 3.6)
whenever

BUNDLED WITH
1.17.3
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'rake'
require 'robot-controller/tasks'
require 'resque/pool/tasks'

# Import external rake tasks
Dir.glob('lib/tasks/*.rake').each { |r| import r }
Expand Down
2 changes: 1 addition & 1 deletion config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
Resque.redis = REDIS_URL
end
end
require 'robot-controller'

require 'honeybadger'
38 changes: 3 additions & 35 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

set :application, 'gisRobotSuite'
set :repo_url, 'https://github.com/sul-dlss/gis-robot-suite.git'
set :whenever_identifier, -> { "#{fetch(:application)}_#{fetch(:stage)}" }

# Default branch is :master
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
Expand Down Expand Up @@ -43,37 +42,6 @@
set :bundle_without, %w[development deployment].join(' ')

# update shared_configs before restarting app
before 'deploy:restart', 'shared_configs:update'

namespace :deploy do
# This is a try to configure a clean install
# desc 'Start application'
# task :start do
# invoke 'deploy'
# on roles(:app), in: :sequence, wait: 10 do
# within release_path do
# execute :bundle, :install
# execute :bundle, :exec, :controller, :boot
# end
# end
# end

desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 10 do
within release_path do
# Uncomment with the first deploy
# execute :bundle, :install

# Comment with the first deploy
test :bundle, :exec, :controller, :stop
test :bundle, :exec, :controller, :quit

# Always call the boot
execute :bundle, :exec, :controller, :boot
end
end
end

after :publishing, :restart
end
before 'deploy:publishing', 'shared_configs:update'

after 'deploy:publishing', 'resque:pool:full_restart'
1 change: 0 additions & 1 deletion config/deploy/prod.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Capistrano::OneTimeKey.generate_one_time_key!

set :deploy_environment, 'production'
set :whenever_environment, fetch(:deploy_environment)
set :default_env, robot_environment: fetch(:deploy_environment)
1 change: 0 additions & 1 deletion config/deploy/stage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Capistrano::OneTimeKey.generate_one_time_key!

set :deploy_environment, 'staging'
set :whenever_environment, fetch(:deploy_environment)
set :default_env, robot_environment: fetch(:deploy_environment)
1 change: 1 addition & 0 deletions config/resque-pool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"dor_gisAssemblyWF_approve-data_default,dor_gisAssemblyWF_approve-metadata_default,dor_gisAssemblyWF_assign-placenames_default,dor_gisAssemblyWF_author-metadata_default,dor_gisAssemblyWF_extract-boundingbox_default,dor_gisAssemblyWF_extract-iso19139_default,dor_gisAssemblyWF_extract-thumbnail_default,dor_gisAssemblyWF_finish-data_default,dor_gisAssemblyWF_finish-gis-assembly-workflow_default,dor_gisAssemblyWF_finish-metadata_default,dor_gisAssemblyWF_generate-content-metadata_default,dor_gisAssemblyWF_generate-geo-metadata_default,dor_gisAssemblyWF_generate-mods_default,dor_gisAssemblyWF_load-geo-metadata_default,dor_gisAssemblyWF_normalize-data_default,dor_gisAssemblyWF_package-data_default,dor_gisAssemblyWF_start-assembly-workflow_default,dor_gisAssemblyWF_start-delivery-workflow_default,dor_gisAssemblyWF_wrangle-data_default,dor_gisDeliveryWF_finish-gis-delivery-workflow_default,dor_gisDeliveryWF_load-geoserver_default,dor_gisDeliveryWF_load-geowebcache_default,dor_gisDeliveryWF_load-raster_default,dor_gisDeliveryWF_load-vector_default,dor_gisDeliveryWF_seed-geowebcache_default,dor_gisDeliveryWF_start-gis-discovery-workflow_default,dor_gisDiscoveryWF_export-opengeometadata_default,dor_gisDiscoveryWF_finish-gis-discovery-workflow_default,dor_gisDiscoveryWF_generate-geoblacklight_default,dor_gisDiscoveryWF_load-geoblacklight_default": 10
33 changes: 0 additions & 33 deletions config/robots.yml

This file was deleted.

10 changes: 0 additions & 10 deletions config/schedule.rb

This file was deleted.

28 changes: 0 additions & 28 deletions spec/unit/robots_spec.rb

This file was deleted.

0 comments on commit 5c85bee

Please sign in to comment.