acpc_table_manager 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/acpc_proxy +2 -2
- data/lib/acpc_table_manager/match.rb +11 -7
- data/lib/acpc_table_manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d70b98f25734162aa73784163ad9b0ad4e1da2f
|
4
|
+
data.tar.gz: 27922143aa8c9b314f5b9cdd3e1dc2e6a403ecf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23681008e962526b537672c7db5ce846b626fae93629e85492df5d1f1db5cc562df324005df211dfacb739c99f716a7f30f647a4ced07a538ecac82463c9dcbd
|
7
|
+
data.tar.gz: c3a40095295e2136f4d06a2e364054dfcb90783be7ab20fd22d70a754ba5e4f164cb1458e11c3c2490e8f7c51c44b1d9433b7274fb08f527c770dad5d94c5dca
|
data/exe/acpc_proxy
CHANGED
@@ -49,11 +49,15 @@ class Match
|
|
49
49
|
|
50
50
|
class << self
|
51
51
|
# @todo Move to AcpcDealer
|
52
|
-
def
|
53
|
-
|
52
|
+
def safe_kill(pid)
|
53
|
+
if pid && pid > 0
|
54
54
|
AcpcDealer::kill_process pid
|
55
55
|
sleep 1 # Give the process a chance to exit
|
56
|
-
|
56
|
+
end
|
57
|
+
end
|
58
|
+
def kill_process_if_running(pid)
|
59
|
+
begin
|
60
|
+
safe_kill pid
|
57
61
|
if AcpcDealer::process_exists?(pid)
|
58
62
|
AcpcDealer::force_kill_process pid
|
59
63
|
sleep 1 # Give the process a chance to exit
|
@@ -216,8 +220,8 @@ class Match
|
|
216
220
|
field :port_numbers, type: Array
|
217
221
|
field :random_seed, type: Integer, default: new_random_seed
|
218
222
|
field :last_slice_viewed, type: Integer, default: -1
|
219
|
-
field :dealer_pid, type: Integer, default:
|
220
|
-
field :proxy_pid, type: Integer, default:
|
223
|
+
field :dealer_pid, type: Integer, default: nil
|
224
|
+
field :proxy_pid, type: Integer, default: nil
|
221
225
|
field :ready_to_start, type: Boolean, default: false
|
222
226
|
field :unable_to_start_dealer, type: Boolean, default: false
|
223
227
|
field :dealer_options, type: String, default: (
|
@@ -343,10 +347,10 @@ class Match
|
|
343
347
|
def finished?() started? && self.slices.last.match_ended? end
|
344
348
|
def running?() dealer_running? && proxy_running? end
|
345
349
|
def dealer_running?
|
346
|
-
self.dealer_pid
|
350
|
+
self.dealer_pid && self.dealer_pid > 0 && AcpcDealer::process_exists?(self.dealer_pid)
|
347
351
|
end
|
348
352
|
def proxy_running?
|
349
|
-
self.proxy_pid
|
353
|
+
self.proxy_pid && self.proxy_pid > 0 && AcpcDealer::process_exists?(self.proxy_pid)
|
350
354
|
end
|
351
355
|
def all_slices_viewed?
|
352
356
|
self.last_slice_viewed >= (self.slices.length - 1)
|