redis-repeater 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/redis_repeater.rb +10 -5
- data/lib/redis_repeater/version.rb +1 -1
- metadata +4 -24
data/lib/redis_repeater.rb
CHANGED
@@ -15,16 +15,21 @@ module RedisRepeater
|
|
15
15
|
DefaultRedisPort = 6379
|
16
16
|
LogDefaultFilename = File.dirname(__FILE__) + '/../log/redis_repeater.log'
|
17
17
|
|
18
|
-
def self.start(
|
18
|
+
def self.start(config_path)
|
19
|
+
|
20
|
+
# allow a directory OR a yml file
|
21
|
+
if File.directory?(config_path)
|
22
|
+
config = YAML::load File.open(File.join(config_path, 'config.yml'))
|
23
|
+
queues = YAML::load File.open(File.join(config_path, 'queues.yml'))
|
24
|
+
else
|
25
|
+
config = YAML::load File.open(config_path)
|
26
|
+
queues = config['queues']
|
27
|
+
end
|
19
28
|
|
20
29
|
# Connect to redis
|
21
|
-
config = YAML::load File.open("#{config_dir}/config.yml")
|
22
30
|
redis_from = redis_configure(config, 'origin')
|
23
31
|
redis_to = redis_configure(config, 'destination')
|
24
32
|
|
25
|
-
# Load the queues from the config file
|
26
|
-
queues = YAML::load File.open("#{config_dir}/queues.yml")
|
27
|
-
|
28
33
|
# replace 'magic' resque:queues key with all resque queues, but don't overwrite otherwise configured queues
|
29
34
|
# warning: only resolves queue names on startup, if new queue is created it will not pick it up.
|
30
35
|
if queues.has_key?("resque:queues")
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-repeater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 6
|
10
|
-
version: 0.0.6
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- John Crepezzi
|
@@ -15,7 +10,7 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-14 00:00:00 -04:00
|
19
14
|
default_executable:
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
@@ -26,9 +21,6 @@ dependencies:
|
|
26
21
|
requirements:
|
27
22
|
- - ">="
|
28
23
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
24
|
version: "0"
|
33
25
|
type: :development
|
34
26
|
version_requirements: *id001
|
@@ -40,9 +32,6 @@ dependencies:
|
|
40
32
|
requirements:
|
41
33
|
- - ">="
|
42
34
|
- !ruby/object:Gem::Version
|
43
|
-
hash: 3
|
44
|
-
segments:
|
45
|
-
- 0
|
46
35
|
version: "0"
|
47
36
|
type: :runtime
|
48
37
|
version_requirements: *id002
|
@@ -54,9 +43,6 @@ dependencies:
|
|
54
43
|
requirements:
|
55
44
|
- - ">="
|
56
45
|
- !ruby/object:Gem::Version
|
57
|
-
hash: 3
|
58
|
-
segments:
|
59
|
-
- 0
|
60
46
|
version: "0"
|
61
47
|
type: :runtime
|
62
48
|
version_requirements: *id003
|
@@ -90,23 +76,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
76
|
requirements:
|
91
77
|
- - ">="
|
92
78
|
- !ruby/object:Gem::Version
|
93
|
-
hash: 3
|
94
|
-
segments:
|
95
|
-
- 0
|
96
79
|
version: "0"
|
97
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
81
|
none: false
|
99
82
|
requirements:
|
100
83
|
- - ">="
|
101
84
|
- !ruby/object:Gem::Version
|
102
|
-
hash: 3
|
103
|
-
segments:
|
104
|
-
- 0
|
105
85
|
version: "0"
|
106
86
|
requirements: []
|
107
87
|
|
108
88
|
rubyforge_project: redis-repeater
|
109
|
-
rubygems_version: 1.
|
89
|
+
rubygems_version: 1.6.2
|
110
90
|
signing_key:
|
111
91
|
specification_version: 3
|
112
92
|
summary: Redis Repeater
|