acpc_table_manager 3.0.7 → 3.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acpc_table_manager/match.rb +16 -2
- data/lib/acpc_table_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 808c9fb99e11e9c783e5e76ddba2883c13a61b25
|
4
|
+
data.tar.gz: 485d2baaa9155af73b9eb92afdf60efb679f7dd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 707785193379baf665b64bd0c512ab6d5672136e2546804a8ced1b9de3574e560839149a9248b3d588118b17e8b4b46a5e873c5c310c3bd8e4692aa8764f55a5
|
7
|
+
data.tar.gz: 44b5e3c6d38d82d7ddd8268e5794e801de8c728e9fb7789e67d229a5c8669941db2a4b9eecea84ba2d0f45e8a6f72433c16fc43893a30ec861c5bfb1f8e9faa2
|
@@ -46,6 +46,10 @@ class Match
|
|
46
46
|
scope :started, -> { with_slices(true) }
|
47
47
|
scope :not_started, -> { with_slices(false) }
|
48
48
|
scope :ready_to_start, -> { where(ready_to_start: true) }
|
49
|
+
scope(
|
50
|
+
:possibly_running,
|
51
|
+
where(:proxy_pid.gt => 0).and.where(:dealer_pid.gt => 0)
|
52
|
+
)
|
49
53
|
|
50
54
|
class << self
|
51
55
|
# @todo Move to AcpcDealer
|
@@ -86,10 +90,14 @@ class Match
|
|
86
90
|
|
87
91
|
# Almost scopes
|
88
92
|
def running(matches=all)
|
89
|
-
matches.select { |match| match.running? }
|
93
|
+
matches.possibly_running.select { |match| match.running? }
|
90
94
|
end
|
91
95
|
def not_running(matches=all)
|
92
|
-
|
96
|
+
(
|
97
|
+
matches.not.possibly_running.to_a + (
|
98
|
+
matches.possibly_running.select { |match| !match.running? }
|
99
|
+
)
|
100
|
+
)
|
93
101
|
end
|
94
102
|
def finished(matches=all)
|
95
103
|
matches.select { |match| match.finished? }
|
@@ -424,6 +432,9 @@ class Match
|
|
424
432
|
)
|
425
433
|
)
|
426
434
|
end
|
435
|
+
self.dealer_pid = nil
|
436
|
+
save
|
437
|
+
self
|
427
438
|
end
|
428
439
|
|
429
440
|
def defunkt?()
|
@@ -438,6 +449,9 @@ class Match
|
|
438
449
|
)
|
439
450
|
)
|
440
451
|
end
|
452
|
+
self.proxy_pid = nil
|
453
|
+
save
|
454
|
+
self
|
441
455
|
end
|
442
456
|
|
443
457
|
def kill_orphan_proxy!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acpc_table_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Morrill
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pony
|