six-updater-web 0.14.10 → 0.14.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.
data/Rakefile
CHANGED
data/bin/six-updater-web
CHANGED
data/bin/six-updater-web-rake
CHANGED
@@ -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.
|
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: (
|
280
|
-
|
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
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
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
|