elastics-admin 1.1.5 → 1.1.6
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.
- data/VERSION +1 -1
- data/lib/elastics/admin_live_reindex.rb +14 -3
- data/lib/elastics-admin.rb +1 -1
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.6
|
|
@@ -36,9 +36,20 @@ module Elastics
|
|
|
36
36
|
unless Conf.redis.class.to_s == 'Redis'
|
|
37
37
|
raise MissingAppIdError, 'You must set the Elastics::Configuration.app_id, and be sure you deploy it before live-reindexing.' \
|
|
38
38
|
if Conf.app_id.nil? || Conf.app_id.empty?
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
|
|
40
|
+
if get(:pid) && (pid = get(:pid).to_i)
|
|
41
|
+
message = begin
|
|
42
|
+
Process.kill(0, pid)
|
|
43
|
+
%(The live-reindex of "#{Conf.app_id}" is in progress (PID #{pid}).)
|
|
44
|
+
rescue Errno::ESRCH
|
|
45
|
+
# no process running (will reset_keys and continue)
|
|
46
|
+
rescue Exception
|
|
47
|
+
%(It looks like the live-reindex of "#{Conf.app_id}" is in progress (PID #{pid}). If you are sure that there is no live-reindex in progress, please run the "elastics:admin:reset_redis_keys APP_ID=#{Conf.app_id}" rake task and retry.)
|
|
48
|
+
end
|
|
49
|
+
raise LiveReindexInProgressError, message if message
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
reset_keys
|
|
42
53
|
set(:pid, $$)
|
|
43
54
|
end
|
|
44
55
|
|
data/lib/elastics-admin.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elastics-admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.6
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: elastics-client
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - '='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 1.1.
|
|
21
|
+
version: 1.1.6
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - '='
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 1.1.
|
|
29
|
+
version: 1.1.6
|
|
30
30
|
description: Provides binary and rake tasks to dump, load and optionally rename indices.
|
|
31
31
|
Implements live-reindex with hot-swap of old code/index with new code/index.
|
|
32
32
|
email: dd.nexus@gmail.com
|