search_and_resque 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/search_and_resque/queue.rb +2 -1
- data/lib/search_and_resque/version.rb +1 -1
- data/lib/search_and_resque.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1871f67e765442bdb5ffc6d20cdfbb9ced988ea
|
4
|
+
data.tar.gz: 31deba9088c4f742ffe5cd8d3c1beb7a1aa94284
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 507c6863e9b365e53bee7f2864222e0d4fe6f3ade777ebac0bb121603b68d43be1e584fb6d6f9979914b0b5eccfacee3626a40a66dea4508cefc0d8ebf4f2d83
|
7
|
+
data.tar.gz: f3b984617b83c2db1cc5d3dc5024eb48ec35e9c958152bc983662043a3126134a0698ae0cd11117a4b85c347455657b6885a9b4152d264f13eb1526273bc56ec
|
@@ -5,7 +5,8 @@ module SearchAndResque
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.perform(type_name, action, ids)
|
8
|
-
|
8
|
+
index = SearchAndResque.chewy_index
|
9
|
+
type = index.types.find{ |t| t.type_name == type_name }
|
9
10
|
type.send(action, ids)
|
10
11
|
end
|
11
12
|
|
data/lib/search_and_resque.rb
CHANGED
@@ -16,16 +16,16 @@ module SearchAndResque
|
|
16
16
|
@queue
|
17
17
|
end
|
18
18
|
|
19
|
-
def self.
|
19
|
+
def self.chewy_index_name=(name)
|
20
20
|
@index_name = "#{name}"
|
21
21
|
end
|
22
22
|
|
23
|
-
def self.
|
23
|
+
def self.chewy_index_name
|
24
24
|
@index_name
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.chewy_index
|
28
|
-
Object.const_get(
|
28
|
+
Object.const_get(chewy_index_name)
|
29
29
|
end
|
30
30
|
|
31
31
|
module ClassMethods
|