cuboid 0.3.0 → 0.3.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96bd306b00ebd204bf368057a8b7e2ba7e55fd180a413cd726ba13b83f239cee
4
- data.tar.gz: a5e6458221a0d939c851bafc2a83d425b5956b642b9b0b7d2b080e063121b0d0
3
+ metadata.gz: 9882c1f93ae353247713118761613155326969155b46ab7690c2cc65bad468dd
4
+ data.tar.gz: fba8af57e534cd98732ca82b4b8d7c97d53912959eb64a6669e3ef8a75f18ca0
5
5
  SHA512:
6
- metadata.gz: 571f6d4a8dc98fdac3bc0c6e38fd6910a796ad980c88b06625d0405924dfae7634b4619ddd78127718163fd8c8fb52bce9711ef3358b1380be8574fecdf9dc59
7
- data.tar.gz: 36f4562ef9e596a272f91101d2ad2f40e062f6571ae72cff98bc083b8ada0615da3eba05ec5083d80081feefb3bd0acc4950d0e8c6dae4ebb2c5c17f47366869
6
+ metadata.gz: bace8b2f1caf1faf15ed1bba364b0c3dc95a82579b31c97229929b98ab232e1d131b519b70d570a96fa73a7684585e5327cb04c449335968016c5f00f60fb007
7
+ data.tar.gz: 8eec88ef97f9e4ec71e73038ad8b70ce7d8a1630ea917ac91f1760c98f482aa6de3d5fcf007c573639939ad9e1d967b6304f7f8e4a9b339e9ef70dddbbf4b887
@@ -11,6 +11,7 @@ class Manager
11
11
  include Singleton
12
12
 
13
13
  RUNNER = "#{File.dirname( __FILE__ )}/executables/base.rb"
14
+ SPAWN_RETRIES = 10
14
15
 
15
16
  # @return [Array<Integer>] PIDs of all running processes.
16
17
  attr_reader :pids
@@ -227,17 +228,23 @@ class Manager
227
228
  argv = [executable, encoded_options]
228
229
 
229
230
 
230
- # It's very, **VERY** important that we use this argument format as
231
- # it bypasses the OS shell and we can thus count on a 1-to-1 process
232
- # creation and that the PID we get will be for the actual process.
233
- pid = Process.spawn(
234
- {
235
- 'CUBOID_SPAWN_OPTIONS' => encoded_cuboid_options
236
- },
237
- RbConfig.ruby,
238
- RUNNER,
239
- *(argv + [spawn_options])
240
- )
231
+ pid = nil
232
+ SPAWN_RETRIES.times do |i|
233
+ begin
234
+ # It's very, **VERY** important that we use this argument format as
235
+ # it bypasses the OS shell and we can thus count on a 1-to-1 process
236
+ # creation and that the PID we get will be for the actual process.
237
+ pid = Process.spawn(
238
+ {
239
+ 'CUBOID_SPAWN_OPTIONS' => encoded_cuboid_options
240
+ },
241
+ RbConfig.ruby,
242
+ RUNNER,
243
+ *(argv + [spawn_options])
244
+ )
245
+ break if alive? pid
246
+ end
247
+ end
241
248
 
242
249
  self << pid
243
250
 
@@ -41,7 +41,7 @@ class Base
41
41
  end
42
42
 
43
43
  def disk_space_for( pid )
44
- return 0 if !Dir.exists?( Options.paths.tmp_dir_for( pid ) )
44
+ return 0 if !Dir.exist?( Options.paths.tmp_dir_for( pid ) )
45
45
 
46
46
  IO.read( disk_space_file_for( pid ) ).to_i
47
47
  end
data/lib/version CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.2
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.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tasos Laskos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-12 00:00:00.000000000 Z
11
+ date: 2026-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -473,7 +473,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
473
473
  - !ruby/object:Gem::Version
474
474
  version: '0'
475
475
  requirements: []
476
- rubygems_version: 3.4.20
476
+ rubygems_version: 3.4.19
477
477
  signing_key:
478
478
  specification_version: 4
479
479
  summary: An application-centric, decentralised and distributed computing solution.