flying-sphinx 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -51,6 +51,8 @@ class FlyingSphinx::IndexRequest
51
51
 
52
52
  !request_complete?
53
53
  end
54
+ rescue Net::SSH::Exception
55
+ cancel_request
54
56
  end
55
57
 
56
58
  def begin_request
@@ -74,6 +76,12 @@ class FlyingSphinx::IndexRequest
74
76
  end
75
77
  end
76
78
 
79
+ def cancel_request
80
+ return if index_id.nil?
81
+
82
+ api.put "/app/indices/#{index_id}", :status => 'CANCELLED'
83
+ end
84
+
77
85
  def api
78
86
  configuration.api
79
87
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flying-sphinx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Allan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-02 00:00:00 +11:00
18
+ date: 2011-01-04 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency