six-updater-web 0.14.10 → 0.14.12

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/testtask'
7
7
 
8
8
  spec = Gem::Specification.new do |s|
9
9
  s.name = 'six-updater-web'
10
- s.version = '0.14.10'
10
+ s.version = '0.14.12'
11
11
  s.has_rdoc = false
12
12
  #s.extra_rdoc_files = ['README', 'LICENSE']
13
13
  s.summary = 'Your summary here'
data/bin/six-updater-web CHANGED
@@ -13,5 +13,6 @@ rescue => e
13
13
  rescue
14
14
  puts "ERROR: #{$!}"
15
15
  end
16
- sleep 10
16
+ sleep 5
17
+ Process.exit(1) # Return error-1
17
18
  end
@@ -14,5 +14,6 @@ rescue => e
14
14
  rescue
15
15
  puts "ERROR: #{$!}"
16
16
  end
17
- sleep 10
17
+ sleep 5
18
+ Process.exit(1) # Return error-1
18
19
  end
@@ -246,12 +246,13 @@ class Sixconfig < ActiveRecord::Base
246
246
  if Time.now - previous > 2
247
247
  previous = Time.now
248
248
  done = []
249
+ messages.uniq!
249
250
  begin
250
- messages.uniq.each {|msg| msg.save; done << msg}
251
+ messages.each {|msg| msg.save; done << msg}
251
252
  rescue => e
252
253
  backtrace(e, log)
253
254
  end
254
- messages -= done
255
+ messages -= done
255
256
  end
256
257
  end
257
258
  end
@@ -276,8 +277,10 @@ class Sixconfig < ActiveRecord::Base
276
277
 
277
278
  # Handle status and pid
278
279
  if shebang
279
- shebang[/^SIX-SHEBANG: ([0-9]*), ([0-9]*)/]
280
- pid, status = $1.to_i, $2.to_i
280
+ if shebang[/^SIX-SHEBANG: (-?.*), (-?.*)/]
281
+ pid = $1.to_i if $1
282
+ status = $2.to_i if $2
283
+ end
281
284
  end
282
285
  else
283
286
  # Handle last bits in the buffer
@@ -297,10 +300,16 @@ class Sixconfig < ActiveRecord::Base
297
300
  end
298
301
 
299
302
  unless messages.empty?
300
- begin
301
- messages.each {|msg| msg.save}
302
- rescue => e
303
- backtrace(e, log)
303
+ i = 0; done = false
304
+ until done || i > 3
305
+ i += 1
306
+ begin
307
+ messages.each {|msg| msg.save}
308
+ done = true
309
+ rescue => e
310
+ backtrace(e, log)
311
+ sleep 2
312
+ end
304
313
  end
305
314
  end
306
315
  end
@@ -22,7 +22,7 @@ case RUBY_VERSION
22
22
  end
23
23
 
24
24
  module SixUpdaterWeb
25
- VERSION = "0.14.10"
25
+ VERSION = "0.14.12"
26
26
  COMPONENT = "six-updater-web"
27
27
 
28
28
  DEFAULT_IP = "127.0.0.1" unless defined?(DEFAULT_IP)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 14
8
- - 10
9
- version: 0.14.10
8
+ - 12
9
+ version: 0.14.12
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sickboy