cuboid 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/cuboid/application.rb +4 -0
- data/lib/cuboid/option_groups/rpc.rb +4 -0
- data/lib/cuboid/rpc/server/application_wrapper.rb +1 -1
- data/lib/cuboid/rpc/server/instance.rb +11 -4
- data/lib/cuboid/state/application.rb +0 -4
- data/lib/version +1 -1
- data/spec/cuboid/rpc/server/instance_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 278074cb43a3bbbe9c868f6fa73f4be09b0c61456a791c9b8e4d6976663ebcce
|
4
|
+
data.tar.gz: 0b49b4aa13bff9232c8b58a9dd828b9f71a42107279e5d3fb3b7188deb2a1c23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fbc63babfbfd8a79ecec9c9833c24405776cfbd35bb087ab9d765fbc153907e48ae183c000b7ae8a96ba9ae0152b7c3037fe5814d8c40528963279e1be9eeee
|
7
|
+
data.tar.gz: b4a8d35eadb8b454c655f325eb3b16cb6cdaf4f398f41bab88435023cece7bf842d3ad48fa5fe9c8ca73ccc6f782663cce81b0ea07e6353189d027f9ef5d9127
|
data/CHANGELOG.md
CHANGED
data/lib/cuboid/application.rb
CHANGED
@@ -19,7 +19,7 @@ class ApplicationWrapper
|
|
19
19
|
def_delegators :@application, :suspended?, :suspending?, :suspend!, :status,
|
20
20
|
:pause!, :running?, :status_messages, :paused?, :pausing?,
|
21
21
|
:snapshot_path, :restore!, :resume!, :generate_report,
|
22
|
-
:abort!, :aborting?, :aborted
|
22
|
+
:abort!, :aborting?, :aborted?, :shutdown
|
23
23
|
|
24
24
|
# {RPC::Server::Application} error namespace.
|
25
25
|
#
|
@@ -102,7 +102,10 @@ class Instance
|
|
102
102
|
# @see #suspend
|
103
103
|
# @see #snapshot_path
|
104
104
|
def restore!( snapshot )
|
105
|
-
|
105
|
+
Thread.new do
|
106
|
+
@application.restore!( snapshot ).run
|
107
|
+
end
|
108
|
+
|
106
109
|
true
|
107
110
|
end
|
108
111
|
|
@@ -123,7 +126,7 @@ class Instance
|
|
123
126
|
#
|
124
127
|
# @see #report
|
125
128
|
def abort_and_generate_report
|
126
|
-
@application.
|
129
|
+
@application.abort!
|
127
130
|
generate_report
|
128
131
|
end
|
129
132
|
|
@@ -205,8 +208,10 @@ class Instance
|
|
205
208
|
|
206
209
|
@active_options.set( application: options )
|
207
210
|
|
208
|
-
|
209
|
-
|
211
|
+
Thread.new do
|
212
|
+
@application.run
|
213
|
+
@run_initializing = false
|
214
|
+
end
|
210
215
|
|
211
216
|
true
|
212
217
|
end
|
@@ -221,6 +226,8 @@ class Instance
|
|
221
226
|
|
222
227
|
print_status 'Shutting down...'
|
223
228
|
|
229
|
+
@application.shutdown
|
230
|
+
|
224
231
|
# We're shutting down services so we need to use a concurrent way but
|
225
232
|
# without going through the Reactor.
|
226
233
|
Thread.new do
|
@@ -110,10 +110,6 @@ class Application
|
|
110
110
|
@status == :timed_out
|
111
111
|
end
|
112
112
|
|
113
|
-
# @param [Bool] block
|
114
|
-
# `true` if the method should block until an abortion has completed,
|
115
|
-
# `false` otherwise.
|
116
|
-
#
|
117
113
|
# @return [Bool]
|
118
114
|
# `true` if the abort request was successful, `false` if the system is
|
119
115
|
# already {#suspended?} or is {#suspending?}.
|
data/lib/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
@@ -111,8 +111,6 @@ describe 'Cuboid::RPC::Server::Instance' do
|
|
111
111
|
subject = instance_spawn
|
112
112
|
subject.restore! snapshot_path
|
113
113
|
|
114
|
-
File.delete snapshot_path
|
115
|
-
|
116
114
|
sleep 1 while subject.status != :done
|
117
115
|
|
118
116
|
expect(subject.generate_report.options).to eq(options)
|
@@ -204,6 +202,8 @@ describe 'Cuboid::RPC::Server::Instance' do
|
|
204
202
|
|
205
203
|
describe '#abort_and_generate_report' do
|
206
204
|
it "cleans-up and returns the report as #{Cuboid::Report}" do
|
205
|
+
subject.run
|
206
|
+
|
207
207
|
expect(subject.abort_and_generate_report).to be_kind_of Cuboid::Report
|
208
208
|
end
|
209
209
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuboid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tasos Laskos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|