coney_island 0.7.11 → 0.7.12

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
  SHA1:
3
- metadata.gz: 0f3c4d7395e6deffa7e2b8bcf76fe5ecfee1f3a3
4
- data.tar.gz: acb76aa99f6b6258b8e97954d799ca532cd12bb9
3
+ metadata.gz: 35249aa1fc86cd520eb3128ebc8b4f5b581536bc
4
+ data.tar.gz: fb1f5b1f66a2628d7138bf0961f938de78b7c4cc
5
5
  SHA512:
6
- metadata.gz: f04d66a0281c35b45b06cc1e7af45ad2aa679f1d6476c4d3b727cd0e7b6b78bc6fda60658f8f5dace3bd237fbca7cb6502f0b9b724fbb2845f2d7864e43b86f6
7
- data.tar.gz: cb6268ab85acbf1a2a40edae1988bd19e8e2e77c14e0092af15f1be2806fcc8993184dc0fddca66df7c8e8a7002c6c1c7d6d946790913545078bed36bfd74ae8
6
+ metadata.gz: e3604103b90ab2b082539deb8103c48f58bd8be236ee7fce57670ad438f6bc0fab158dde85eff0f103e3537b759027dd2d999924b8b426b7ea0569c46a90d9c4
7
+ data.tar.gz: c3df98682ca6a4109043c2e915437728a747d2ef9b4b94adc94c4a9117695bdded489bda9c9d00d3e62fd4351daaf1b7998aab90de89a2b2ac1d2c54f71628fb
@@ -1,3 +1,3 @@
1
1
  module ConeyIsland
2
- VERSION = "0.7.11"
2
+ VERSION = "0.7.12"
3
3
  end
@@ -101,6 +101,12 @@ module ConeyIsland
101
101
  self.log.info("Connected to AMQP broker. Running #{AMQP::VERSION}")
102
102
  @channel = AMQP::Channel.new(connection)
103
103
  @exchange = @channel.topic('coney_island')
104
+ #Handle a lost connection to rabbitMQ
105
+ connection.on_tcp_connection_loss do |connection, settings|
106
+ # since we lost the connection, rabbitMQ will resend all jobs we didn't finish
107
+ # so drop them and restart
108
+ self.abandon_and_shutdown
109
+ end
104
110
 
105
111
  #send a heartbeat every 15 seconds to avoid aggresive network configurations that close quiet connections
106
112
  heartbeat_exchange = self.channel.fanout('coney_island_heartbeat')
@@ -228,11 +234,10 @@ module ConeyIsland
228
234
  end
229
235
 
230
236
  def self.shutdown(signal)
231
- shutdown_time = Time.now
232
237
  @child_pids.each do |child_pid|
233
238
  Process.kill(signal, child_pid)
234
239
  end
235
- @queue.unsubscribe
240
+ @queue.unsubscribe rescue nil
236
241
  EventMachine.add_periodic_timer(1) do
237
242
  if self.job_attempts.any?
238
243
  self.log.info("Waiting for #{self.job_attempts.length} requests to finish")
@@ -12,3 +12,7 @@ Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
12
12
  ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
13
13
  ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
14
14
  Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
15
+ ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
16
+ Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
17
+ Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
18
+ ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
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.11
4
+ version: 0.7.12
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-28 00:00:00.000000000 Z
12
+ date: 2015-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails