perfectqueue 0.7.25 → 0.7.26

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/ChangeLog CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ == 2012-09-19 version 0.7.26
3
+
4
+ * RDBBackend: #issue should not ignore erros excepting duplicate entry error
5
+
6
+
7
+ == 2012-09-19 version 0.7.25
8
+
9
+ * removed depenedency on aws-sdk which is optional
10
+
11
+
2
12
  == 2012-08-10 version 0.7.24
3
13
 
4
14
  * Kill running task if an unexpected error occured during extending timeout
@@ -146,8 +146,14 @@ SQL
146
146
  begin
147
147
  n = @db["INSERT INTO `#{@table}` (id, timeout, data, created_at, resource, max_running) VALUES (?, ?, ?, ?, ?, ?);", id, time, data, time, resource, max_running].insert
148
148
  return true
149
- rescue Sequel::DatabaseError
150
- return nil
149
+ rescue Sequel::DatabaseError => e
150
+ # Sequel doesn't provide error classes to distinguish duplicate-entry from other
151
+ # errors like connectivity error. This code assumes the driver is mysql2 and
152
+ # the error message is "Mysql::ServerError::DupEntry: Duplicate entry"
153
+ if /: Duplicate entry/
154
+ return nil
155
+ end
156
+ raise e
151
157
  end
152
158
  }
153
159
  end
@@ -1,5 +1,5 @@
1
1
  module PerfectQueue
2
2
 
3
- VERSION = '0.7.25'
3
+ VERSION = '0.7.26'
4
4
 
5
5
  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.7.25
4
+ version: 0.7.26
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-09-19 00:00:00.000000000 Z
12
+ date: 2013-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel