perfectqueue 0.8.21 → 0.8.22

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ == 2012-10-22 version 0.8.22
3
+
4
+ * rdb_compat backend fixed heartbeat method to check created_at properly
5
+
6
+
2
7
  == 2012-09-11 version 0.8.21
3
8
 
4
9
  * rdb_compat backend uses IS NOT NULL condition instead of >= because RANGE
@@ -262,13 +262,12 @@ SQL
262
262
  row = @db.fetch("SELECT id, timeout, created_at FROM `#{@table}` WHERE id=? LIMIT 1", key).first
263
263
  if row == nil
264
264
  raise PreemptedError, "task key=#{key} does not exist or preempted."
265
+ elsif row[:created_at] == nil
266
+ raise PreemptedError, "task key=#{key} preempted."
265
267
  elsif row[:created_at] <= 0
266
268
  raise CancelRequestedError, "task key=#{key} is cancel requested."
267
- elsif row[:timeout] == next_timeout
269
+ else # row[:timeout] == next_timeout
268
270
  # ok
269
- else
270
- # row[:created_at] == null
271
- raise PreemptedError, "task key=#{key} preempted."
272
271
  end
273
272
  end
274
273
  }
@@ -1,3 +1,3 @@
1
1
  module PerfectQueue
2
- VERSION = "0.8.21"
2
+ VERSION = "0.8.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfectqueue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.21
4
+ version: 0.8.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-11 00:00:00.000000000 Z
12
+ date: 2012-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel