nesta-plugin-drop 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41be09dcd283f15731d4e467d203c853474f1a5c
4
- data.tar.gz: c725915c0b6aa405c4219964712f9fa0a1e05497
3
+ metadata.gz: 14c01e6b192cfece669c26f696b981568f38a814
4
+ data.tar.gz: ea358b7725b37e68d4e012929a5257ade1e42b05
5
5
  SHA512:
6
- metadata.gz: e0f5cfcbe135d2f23d7e952527db162e340005a03afbe8625132aa8859a2dd616397fb813b39e6caaad192baad2bb18cf3af45948efbd872d40923d8015eef08
7
- data.tar.gz: 6031acfd42b7f7cb54b6bee6a548448ce8a9133b9fddb83dd1f10d4176cb460d1eb049935d86f4276cf4bcc27d205b2c8f66f07a04c46b1f64d32c2c8a9d7906
6
+ metadata.gz: 2b94f36de0974cf53610ab881a7c31d292ed4d496a1be0b872fc261b8e4b13c6c9f0e66158d90be813d812e54165c247c74fc7044b5914de8f66ffedcefe8b50
7
+ data.tar.gz: e798827305efa8504a894c8dfe20075fb4da9706a6f1fd671638039880856818832d8b3f0557c976fd4f0411405bcf342426a1ce75b10bbd2098549cba9f92e8
@@ -47,12 +47,15 @@ module Nesta
47
47
 
48
48
  def self.bounce_server!
49
49
  return if syncing?
50
+ Nesta::Plugin::Drop.logger.info "NESTADROP: Purging nesta file cache."
51
+ Nesta::FileModel.purge_cache
50
52
  Nesta::Plugin::Drop.logger.info "NESTADROP: Restarting server..."
51
53
  unless system("bundle exec pumactl -S /tmp/.app_state phased-restart")
52
- # App hasn't finished loading, we can just clear the Nesta cache
53
- # because we've not yet forked worker threads for the web server
54
- Nesta::Plugin::Drop.logger.info "NESTADROP: Purging nesta file cache."
55
- Nesta::FileModel.purge_cache
54
+ Thread.new do
55
+ Nesta::Plugin::Drop.logger.info "NESTADROP: Waiting for server to load before restarting."
56
+ sleep(3)
57
+ bounce_server!
58
+ end
56
59
  end
57
60
  end
58
61
 
@@ -1,7 +1,7 @@
1
1
  module Nesta
2
2
  module Plugin
3
3
  module Drop
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nesta-plugin-drop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glenn Gillen