pushmi_pullyu 0.2.2 → 0.2.3

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: 6f3496b4248ae106b7f01ed1a4cacbc0415e187e
4
- data.tar.gz: 1a4a266aad21adc2186448a737757e2761c0f8b3
3
+ metadata.gz: aa029e62ba807ffc7e27d8cd1d83a88fe2c1d0be
4
+ data.tar.gz: 3a4d45fb2ea65b51bcc87a57ef5e06a7fa612cb5
5
5
  SHA512:
6
- metadata.gz: 79a569829620722b8ebbb791cf5c05664fc3a51784542041493fe9ab1c1a0bb62d1b61c0c7fa9a5d8ad645f2a1d791ab7b2b6e4be617b86223bb2c23ef73a902
7
- data.tar.gz: ddcb23e06b251bf2aa4d53e7c6c1391ec7c5fadbd44bbe9c1225f62088e8c9247c9a387992cf422d54842aba3e166addbb070780da6c5c84fc72379d0aea0cdd
6
+ metadata.gz: d77efad7e946049808f58f8cbbb9ae1ca3e0fec1371e99c1261c27040d63fd09346408ba4592d04c871109ac2887fd799254cb80ff0629bfc646c32d732a12f0
7
+ data.tar.gz: 05e5e4952c71ed5b11b71d9d8dbdc74e17f4a30feee095a456c6eff7678af1118aa28323990828705daac72bf4159f1226f11f4c5394d934b2bfc9224816a777
@@ -19,8 +19,7 @@ minimum_age: 0
19
19
  rollbar_token: 'abc123xyz'
20
20
 
21
21
  redis:
22
- host: localhost
23
- port: 6379
22
+ url: redis://localhost:6379
24
23
 
25
24
  solr:
26
25
  url: http://localhost:8983/solr/development
data/lib/pushmi_pullyu.rb CHANGED
@@ -30,8 +30,7 @@ module PushmiPullyu
30
30
  process_name: 'pushmi_pullyu',
31
31
  queue_name: 'dev:pmpy_queue',
32
32
  redis: {
33
- host: 'localhost',
34
- port: 6379
33
+ url: 'redis://localhost:6379'
35
34
  },
36
35
  # TODO: rest of these are examples for solr/fedora/swift... feel free to fill them in correctly
37
36
  solr: {
@@ -202,10 +202,7 @@ class PushmiPullyu::CLI
202
202
  end
203
203
 
204
204
  def queue
205
- @queue ||= PushmiPullyu::PreservationQueue.new(connection: {
206
- host: options[:redis][:host],
207
- port: options[:redis][:port]
208
- },
205
+ @queue ||= PushmiPullyu::PreservationQueue.new(redis_url: options[:redis][:url],
209
206
  queue_name: options[:queue_name],
210
207
  age_at_least: options[:minimum_age])
211
208
  end
@@ -21,13 +21,15 @@ class PushmiPullyu::PreservationQueue
21
21
 
22
22
  class ConnectionError < StandardError; end
23
23
 
24
- def initialize(connection: {}, pool_opts: { size: 1, timeout: 5 }, poll_interval: 10, age_at_least: 0,
24
+ def initialize(redis_url: 'redis://localhost:6379',
25
+ pool_opts: { size: 1, timeout: 5 },
26
+ poll_interval: 10,
27
+ age_at_least: 0,
25
28
  queue_name: 'dev:pmpy_queue')
26
29
  # we use a connection pool even though we're not (currently) threading
27
30
  # as it transparently provides for repairing connections if they are closed after long periods of inactivity
28
31
  @redis = ConnectionPool.new(pool_opts) do
29
- connection.reverse_merge!(host: 'localhost', port: 6379)
30
- Redis.new(connection)
32
+ Redis.new(url: redis_url)
31
33
  end
32
34
 
33
35
  raise ConnectionError unless connected?
@@ -1,3 +1,3 @@
1
1
  module PushmiPullyu
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.2.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushmi_pullyu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Murnaghan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-15 00:00:00.000000000 Z
11
+ date: 2017-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport