coney_island 0.7.12 → 0.8

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: 35249aa1fc86cd520eb3128ebc8b4f5b581536bc
4
- data.tar.gz: fb1f5b1f66a2628d7138bf0961f938de78b7c4cc
3
+ metadata.gz: c35298c5543296c4c41a42bd756f6ef193a29186
4
+ data.tar.gz: ef14d5797940fd78f324126b7d86e42c7130ef04
5
5
  SHA512:
6
- metadata.gz: e3604103b90ab2b082539deb8103c48f58bd8be236ee7fce57670ad438f6bc0fab158dde85eff0f103e3537b759027dd2d999924b8b426b7ea0569c46a90d9c4
7
- data.tar.gz: c3df98682ca6a4109043c2e915437728a747d2ef9b4b94adc94c4a9117695bdded489bda9c9d00d3e62fd4351daaf1b7998aab90de89a2b2ac1d2c54f71628fb
6
+ metadata.gz: 790d75b9af3c13a51f0493350956c8026d87976efb5f45b2cee87c7c06891a19ac574264ab9aa8e638b162c56f93e693fbd5141e70bb01f7d69b9a5bacd9c3a7
7
+ data.tar.gz: 7b45b0327ea9fe7f01bf76a509921f80dc3e8b355ad35a49206d8d0df68c08fc8289b7581cefbc766b42e7be364d82654288e5ef6eb551802deaf17a0bcb2fbd
@@ -1,3 +1,3 @@
1
1
  module ConeyIsland
2
- VERSION = "0.7.12"
2
+ VERSION = "0.8"
3
3
  end
@@ -105,7 +105,9 @@ module ConeyIsland
105
105
  connection.on_tcp_connection_loss do |connection, settings|
106
106
  # since we lost the connection, rabbitMQ will resend all jobs we didn't finish
107
107
  # so drop them and restart
108
- self.abandon_and_shutdown
108
+ unless @shutting_down
109
+ self.abandon_and_shutdown
110
+ end
109
111
  end
110
112
 
111
113
  #send a heartbeat every 15 seconds to avoid aggresive network configurations that close quiet connections
@@ -228,12 +230,13 @@ module ConeyIsland
228
230
  end
229
231
 
230
232
  def self.abandon_and_shutdown
231
- self.log.info("Lost RabbitMQ connection, abandoning current jobs and restarting")
233
+ self.log.info("Lost RabbitMQ connection, abandoning current jobs and shutting down")
232
234
  self.clear_job_attempts
233
235
  self.shutdown('TERM')
234
236
  end
235
237
 
236
238
  def self.shutdown(signal)
239
+ @shutting_down = true
237
240
  @child_pids.each do |child_pid|
238
241
  Process.kill(signal, child_pid)
239
242
  end
@@ -16,3 +16,5 @@ ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
16
16
  Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
17
17
  Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
18
18
  ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
19
+ ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
20
+ Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coney_island
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.12
4
+ version: '0.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-29 00:00:00.000000000 Z
12
+ date: 2015-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails