perfectqueue 0.8.44 → 0.8.44.1

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: a6f5457263e6492b228864dbc72be480b28ea20f
4
- data.tar.gz: d83d97c23703a464f88db7343615dd856cd925ca
3
+ metadata.gz: ff48a49e577eab839217d96f1efbe4c3bbb74174
4
+ data.tar.gz: d7ddae1782d03ffccacfab5143d7dc08a2f33c1c
5
5
  SHA512:
6
- metadata.gz: d9cdd377afec8f82f13162b92073864e8d2deac00cf705a51409f3fe1343ab5a5d6716d2ed4a11daa50cd76c15bb4a9fbdbdba565003fe7673ead6fc979d2043
7
- data.tar.gz: fbf7ef421de36a66fa9a1712f3fa0dcb59d9b7d648a77dd052bbb6f8c0006549165c0a8f04be4e3894dbb78c15badba37eb381a8bcf5822e9ae3bfabd948b164
6
+ metadata.gz: 59b93afc56e199edaee68619425bbba22bc63674f0f4ae4fe2b7dd6c1bde59e2c08cee771a0e60f1020c3d10a139b39e8fa7328c2714bc978d6220dd516d97de
7
+ data.tar.gz: 58ba8303acadf21474055d62c9cab9dc4fdc734987f709e7063ba448e7240309eb7b83e63bae0c2ec10767a18561acb14e093443a028788f1eafe30e5ee16063
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ == 2016-06-14 version 0.8.44.1
2
+
3
+ * Don't delete v0.8.46's finished tasks for migration
4
+
1
5
  == 2015-10-07 version 0.8.44
2
6
 
3
7
  * rdb_compat: Fix fair scheduling.
@@ -21,6 +21,9 @@ module PerfectQueue
21
21
  class RDBCompatBackend
22
22
  include BackendHelper
23
23
 
24
+ # backport from v0.8.46
25
+ EVENT_HORIZON = 13_0000_0000 # 2011-03-13 07:06:40 UTC
26
+
24
27
  class Token < Struct.new(:key)
25
28
  end
26
29
 
@@ -76,6 +79,7 @@ module PerfectQueue
76
79
  SELECT id, timeout, data, created_at, resource
77
80
  FROM `#{@table}`
78
81
  WHERE timeout <= ? AND timeout <= ? AND created_at IS NOT NULL
82
+ AND #{EVENT_HORIZON} < timeout
79
83
  ORDER BY timeout ASC
80
84
  LIMIT ?
81
85
  SQL
@@ -90,6 +94,7 @@ LEFT JOIN (
90
94
  GROUP BY resource
91
95
  ) AS R ON resource = res
92
96
  WHERE timeout <= ? AND created_at IS NOT NULL AND (max_running-running IS NULL OR max_running-running > 0)
97
+ AND #{EVENT_HORIZON} < timeout
93
98
  ORDER BY weight DESC, timeout ASC
94
99
  LIMIT ?
95
100
  SQL
@@ -235,7 +240,7 @@ SQL
235
240
 
236
241
  if @cleanup_interval_count <= 0
237
242
  connect_locked {
238
- @db["DELETE FROM `#{@table}` WHERE timeout <= ? AND created_at IS NULL", now].delete
243
+ @db["DELETE FROM `#{@table}` WHERE #{EVENT_HORIZON} < timeout && timeout <= ? AND created_at IS NULL", now].delete
239
244
  @cleanup_interval_count = @cleanup_interval
240
245
  }
241
246
  end
@@ -1,3 +1,3 @@
1
1
  module PerfectQueue
2
- VERSION = "0.8.44"
2
+ VERSION = "0.8.44.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfectqueue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.44
4
+ version: 0.8.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -178,3 +178,4 @@ test_files:
178
178
  - spec/spec_helper.rb
179
179
  - spec/stress.rb
180
180
  - spec/supervisor_spec.rb
181
+ has_rdoc: false