et_full_system 1.0.1.pre4 → 1.0.1.pre5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6beef42f9d18b4c7e277eb13c29ac2cd7e6c7faf8509f03479cf39db6c6a0516
4
- data.tar.gz: 7c34827c01f39d2994555cb7429cd62a482c93cc5810a811aaa5684785637895
3
+ metadata.gz: ab79cfecf5e5450243e72e99999218e039ab75a473e87027b8f7f55ab189db48
4
+ data.tar.gz: 033e42be58542400d78c095f88f988d92a226249457d770cba93bb18d4a45b06
5
5
  SHA512:
6
- metadata.gz: e2b5cc72dac96c68b58f7389b9c91b8a5de3bcf8ed562b7f411e07a7c94568cf6625cf3fd428b6aded5958b131ed41d38fcf534c0e969b4959f0f41e9f8e2ed0
7
- data.tar.gz: a3de0af6328cb80a45e460bd5fccc1317c26569b51156a72bb7e255009149c69563fb869a7bb4fcb160b1353b6b663c296b1d0edd6a80a882e8906c91900da24
6
+ metadata.gz: 41fc8e7f1200d3861c00f5f95005c063b3afef3f2648e23bf476a924024626e768ce3635fc37035da49cbf9ea82bab02af4d2518a8933658b9d9ab804a92af9e
7
+ data.tar.gz: 63125fee8f0e26f4b6ccb034961edd1696ae5aeb6c9c01ab067ea23df94437b7a0873e902feb5514800fcd0cabce99018dc8548772b4b0dbc1f5469f12389f6d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_full_system (1.0.1.pre4)
4
+ et_full_system (1.0.1.pre5)
5
5
  aws-sdk-s3 (~> 1.9)
6
6
  azure-storage (~> 0.15.0.preview)
7
7
  dotenv (~> 2.7, >= 2.7.2)
@@ -101,15 +101,19 @@ module EtFullSystem
101
101
  end
102
102
  cmd = "CLOUD_PROVIDER=#{options[:cloud_provider]} RAILS_ENV=#{options[:rails_env]} AZURITE_STORAGE_PATH=\"#{options[:azurite_storage_path]}\" MINIO_STORAGE_PATH=\"#{options[:minio_storage_path]}\" FS_ROOT_PATH=#{PROJECT_PATH} FOREMAN_PATH=#{GEM_PATH}/foreman godotenv -f #{GEM_PATH}/foreman/.env invoker start \"#{GEM_PATH}/foreman/Procfile\" --port=4000"
103
103
  STDERR.puts cmd
104
- puts `#{cmd}`
105
- return if without.empty?
106
-
107
-
108
- stop_cmds = without.reduce([]) do |acc, service|
109
- acc.concat(invoker_processes_for(service))
104
+ unless without.empty?
105
+ stop_cmds = without.reduce([]) do |acc, service|
106
+ acc.concat(invoker_processes_for(service))
107
+ end.map do |proc|
108
+ "invoker remove #{proc}"
109
+ end
110
+ stop_cmd = stop_cmds.join(' && ')
111
+ Thread.new do
112
+ sleep 5
113
+ puts `#{stop_cmd}`
114
+ end
110
115
  end
111
- stop_cmd = stop_cmds.join(' && ')
112
- puts `#{stop_cmd}`
116
+ exec cmd
113
117
  end
114
118
  end
115
119
 
@@ -164,6 +168,18 @@ module EtFullSystem
164
168
 
165
169
  private
166
170
 
171
+ def invoker_processes_for(service)
172
+ case service
173
+ when 'et1' then ['et1_web', 'et1_sidekiq']
174
+ when 'et3' then ['et3_web']
175
+ when 'api' then ['api_web', 'api_sidekiq']
176
+ when 'admin' then ['admin_web']
177
+ when 'atos_api' then ['atos_api_web']
178
+ when 'ccd_export' then ['et_ccd_export_web']
179
+ else raise "Unknown service #{service}"
180
+ end
181
+ end
182
+
167
183
  def procfile_services
168
184
  File.readlines("#{GEM_PATH}/foreman/Procfile").inject([]) do |acc, line|
169
185
  next if line.strip.start_with?('#')
@@ -1,3 +1,3 @@
1
1
  module EtFullSystem
2
- VERSION = "1.0.1.pre4"
2
+ VERSION = "1.0.1.pre5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: et_full_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.pre4
4
+ version: 1.0.1.pre5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor