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 +4 -4
- data/examples/pushmi_pullyu.yml +1 -2
- data/lib/pushmi_pullyu.rb +1 -2
- data/lib/pushmi_pullyu/cli.rb +1 -4
- data/lib/pushmi_pullyu/preservation_queue.rb +5 -3
- data/lib/pushmi_pullyu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa029e62ba807ffc7e27d8cd1d83a88fe2c1d0be
|
|
4
|
+
data.tar.gz: 3a4d45fb2ea65b51bcc87a57ef5e06a7fa612cb5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d77efad7e946049808f58f8cbbb9ae1ca3e0fec1371e99c1261c27040d63fd09346408ba4592d04c871109ac2887fd799254cb80ff0629bfc646c32d732a12f0
|
|
7
|
+
data.tar.gz: 05e5e4952c71ed5b11b71d9d8dbdc74e17f4a30feee095a456c6eff7678af1118aa28323990828705daac72bf4159f1226f11f4c5394d934b2bfc9224816a777
|
data/examples/pushmi_pullyu.yml
CHANGED
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
|
-
|
|
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: {
|
data/lib/pushmi_pullyu/cli.rb
CHANGED
|
@@ -202,10 +202,7 @@ class PushmiPullyu::CLI
|
|
|
202
202
|
end
|
|
203
203
|
|
|
204
204
|
def queue
|
|
205
|
-
@queue ||= PushmiPullyu::PreservationQueue.new(
|
|
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(
|
|
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
|
-
|
|
30
|
-
Redis.new(connection)
|
|
32
|
+
Redis.new(url: redis_url)
|
|
31
33
|
end
|
|
32
34
|
|
|
33
35
|
raise ConnectionError unless connected?
|
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.
|
|
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-
|
|
11
|
+
date: 2017-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|