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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16fe2f6ce11b47a3e2108497fbdfab6e75c072fe
4
- data.tar.gz: 873167f87c427eaf23b10e577a0ac1c8c6679b24
3
+ metadata.gz: 808c9fb99e11e9c783e5e76ddba2883c13a61b25
4
+ data.tar.gz: 485d2baaa9155af73b9eb92afdf60efb679f7dd0
5
5
  SHA512:
6
- metadata.gz: ebc69b97cd5c646858d61dca7f9854f6051361862fedf965e72097a91333d48913ab75f05e6ef4e80b06a9afb1774bedce6f778a98c1ce367b7ca9a5a8a86ac8
7
- data.tar.gz: 47a7d2536ef01bff48a87fd77f44db9562696b1019b564988f36d2d7a657b3d3bb64abe44ade7a1d7df0ec90f5ab7640644eb419e0440d7112eeb21dc04eddf9
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
- matches.select { |match| !match.running? }
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!
@@ -1,3 +1,3 @@
1
1
  module AcpcTableManager
2
- VERSION = "3.0.7"
2
+ VERSION = "3.0.8"
3
3
  end
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.7
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-09 00:00:00.000000000 Z
11
+ date: 2016-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pony