coderunner 0.16.9 → 0.16.10

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
  SHA1:
3
- metadata.gz: 965c131b40f6fa56035dcbb096f2ab2f1854b0f3
4
- data.tar.gz: 3b5cab30f2b1834f3d64a8ff3b1d2fec25c6ea38
3
+ metadata.gz: 21411f5ad7f57734efea8495ee11742ecf3aa024
4
+ data.tar.gz: a0ce50ddfeed76e91d1ab19c07af98ec62b5dce4
5
5
  SHA512:
6
- metadata.gz: 9ce7eaf12bbf889e0dfef57b82a7bb3b7bc5a5d2107c9e3aeaeaf2928e66ce08956d6db97722be21954a3a178760e6b1132ed95f6113754a8b1ce02ee8d59b8c
7
- data.tar.gz: 8e004d802095c14e67d3dd6217dd93cb89a7e4042e2bbac4b48872bd24aac95d44b06c53f24c56b3ffadf3d9765187e12403ac65bb27086cd7b9db57733f345b
6
+ metadata.gz: 36de124b45dfadd6d179fb0dca8b0b3450e5c566da91880b7080908cd2f0aaf8d8783489aeef37cb2a693eb1c97a6ce1184595b4db1cd063f4827f42937cc120
7
+ data.tar.gz: 16c6d3bc8bc85ba3100adcefad814002d57f5cf44ea1c5fd641ecda2a2194f0555f384bcb2b1d8cb4c9239e37ecb9251b6f57f19808afd38bc2930420439a4a3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.9
1
+ 0.16.10
data/coderunner.gemspec CHANGED
@@ -2,12 +2,12 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: coderunner 0.16.9 ruby lib
5
+ # stub: coderunner 0.16.10 ruby lib
6
6
  # stub: ext/extconf.rb
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "coderunner"
10
- s.version = "0.16.9"
10
+ s.version = "0.16.10"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
@@ -392,16 +392,17 @@ EOF
392
392
  unless ENV['CODE_RUNNER_LAUNCHER'] =~ /serial/
393
393
  mutex = Mutex.new
394
394
  processes= []
395
+ command_list = {}
395
396
 
396
397
  Thread.new do
397
398
  loop do
398
399
  `cp #{tl}/queue_status.txt #{tl}/queue_status2.txt`
399
- `ps > #{tl}/queue_status.txt`
400
+ #`ps > #{tl}/queue_status.txt`
400
401
  mutex.synchronize do
401
402
  File.open("#{tl}/queue_status.txt", 'a') do |f|
402
403
  # This ensures that the right pids will be listed,
403
404
  # regardless of the way that ps behaves
404
- f.puts processes
405
+ f.puts processes.map{|pid| "#{pid} #{command_list[pid]}"}
405
406
  end
406
407
  end
407
408
  sleep 1
@@ -439,12 +440,15 @@ EOF
439
440
  exec(command + "\n wait")
440
441
  end
441
442
  `cp #{tl}/queue_status.txt #{tl}/queue_status2.txt; ps > #{tl}/queue_status.txt`
442
- mutex.synchronize{processes.push pid}
443
+ mutex.synchronize do
444
+ processes.push pid
445
+ command_list[pid] = command
446
+ end
443
447
 
444
448
  File.open(tl + '/' + id + '.pid', 'w'){|fle| fle.puts pid}
445
449
  FileUtils.rm(tl + '/' + file)
446
450
 
447
- Thread.new{Process.wait pid; mutex.synchronize{processes.delete pid}}
451
+ Thread.new{Process.wait pid; mutex.synchronize{processes.delete pid; command_list.delete(pid)}}
448
452
  end
449
453
  # processes.each{|pid| Process.wait pid}
450
454
  sleep refresh.to_i
@@ -11,8 +11,10 @@ class CodeRunner
11
11
  launcher_prefix and launcher_prefix.size > 0
12
12
  end
13
13
  def queue_status_launcher
14
- %x[cat #{CodeRunner.launcher_directory}/queue_status.txt | grep sh] +
15
- %x[cat #{CodeRunner.launcher_directory}/queue_status2.txt | grep sh]
14
+ #%x[cat #{CodeRunner.launcher_directory}/queue_status.txt | grep sh] +
15
+ #%x[cat #{CodeRunner.launcher_directory}/queue_status2.txt | grep sh]
16
+ %x[cat #{CodeRunner.launcher_directory}/queue_status.txt ] +
17
+ %x[cat #{CodeRunner.launcher_directory}/queue_status2.txt ]
16
18
  end
17
19
  def execute_launcher
18
20
  launch_id = "#{Time.now.to_i}#{$$}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coderunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.9
4
+ version: 0.16.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock