hotdog 0.21.1 → 0.21.2

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: c323e448164f9b5fccd5352d8dbc1e04089e87fc
4
- data.tar.gz: 2e0128c139b81384abe5dfc8777d221e002d693e
3
+ metadata.gz: bd4e58bca7d389bc16afeed6bd05404855b89343
4
+ data.tar.gz: e401b563a1f9555ad60f3901bbad881831af114f
5
5
  SHA512:
6
- metadata.gz: 77107e99377e6b1f4c887be3373995931d4e7ed622af1e7dc19d719bfb2bd515a8f7e29660955df0152e2e9b8469fb7871cc066ad34287a2ede85c7f7a580dd6
7
- data.tar.gz: 657cd32e8268a48f72f50a2630ff4f4d2d4e93bf1b46428d711746ff51f58a55bc2f350f26f866cea8a6b063b4d3ba2a56e8d72c9a2883349ea47f2cc3d5301d
6
+ metadata.gz: a8f8ebbfcd3243de29b784d0427af224747d69814ba835be3b1ed3f0a224c4c2e4075258feb88152dd10c9083240da48d9671e061a8a980a3db3e1b986d3f628
7
+ data.tar.gz: dbfa93b6bd5590d6a9474639fb64967c809b6c91a363c917cd9516364aa4dc6d981ac159c2961ffa20f2eaf785b360d31963a85c79bac87fb6337c61d5df4fd4
@@ -227,8 +227,8 @@ module Hotdog
227
227
  db = SQLite3::Database.new(persistent_db_path)
228
228
  db.execute("SELECT hosts_tags.host_id FROM hosts_tags INNER JOIN hosts ON hosts_tags.host_id = hosts.id INNER JOIN tags ON hosts_tags.tag_id = tags.id LIMIT 1;")
229
229
  db
230
- rescue SQLite3::BusyException
231
- sleep(rand) # FIXME: configurable retry interval
230
+ rescue SQLite3::BusyException # database is locked
231
+ sleep(rand)
232
232
  retry
233
233
  rescue SQLite3::SQLException
234
234
  db.close()
@@ -295,6 +295,9 @@ module Hotdog
295
295
  begin
296
296
  logger.debug("execute: #{q} -- #{args.inspect}")
297
297
  prepare(db, q).execute(args)
298
+ rescue SQLite3::BusyException # database is locked
299
+ sleep(rand)
300
+ retry
298
301
  rescue
299
302
  logger.warn("failed: #{q} -- #{args.inspect}")
300
303
  raise
@@ -1,3 +1,3 @@
1
1
  module Hotdog
2
- VERSION = "0.21.1"
2
+ VERSION = "0.21.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotdog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yamashita Yuu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler