acpc_table_manager 1.0.6 → 1.0.7

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: f0ba43c60a098ac5766f13d2fb876cced8a2e528
4
- data.tar.gz: b17a37596ab98c642699cd21ae5723618d6d4d86
3
+ metadata.gz: 0b01eeb98e36af6aaad15520f0f7e0b1cbe27aef
4
+ data.tar.gz: 6b2c92ed0052a4f763e62efb2455ae8a832a16ce
5
5
  SHA512:
6
- metadata.gz: 33e0da5309299347cbe397cb782ff9782be98e8dffb536798e16eeb02133e721056a58ecc7a2d5d92bdd8a98ee1be7e3ed671e7d245275f82998242d0243f004
7
- data.tar.gz: 01fa9f8ceab2be0c50d7ecc93b7305ddb3bb443cd804e540f5190a548a6c65be691aff1911aa9434973ecd4d0f7ce441be610c6823edb5b39c6d19bc24f5f4b8
6
+ metadata.gz: 380bb1209589d2f15cc80577ba447a785f32da37b1c19e7d4971c9a16ef0160368f4626587b4353be5d8a172656b424139b4ae2f20d5b3bd38316d6bf415f74b
7
+ data.tar.gz: b9d1dee53a14dd36aba2108ff55bfd3c9ae734df5e6c87a717d4a1345d1b68294f60a4a29f12c9c97b0fe9436d98b3cc7db5e830abe673c910e7bcc8478b3aee
@@ -21,7 +21,9 @@ module AcpcTableManager
21
21
  if game_definition_key
22
22
  @table_queues[game_definition_key] ||= ::AcpcTableManager::TableQueue.new(game_definition_key)
23
23
  @table_queues[game_definition_key].my_matches.not_running.and.not_started.each do |m|
24
- @table_queues[game_definition_key].enqueue! m.id.to_s, m.dealer_options
24
+ unless @table_queues[game_definition_key].running_matches[m.id.to_s]
25
+ @table_queues[game_definition_key].enqueue! m.id.to_s, m.dealer_options
26
+ end
25
27
  end
26
28
  else
27
29
  ::AcpcTableManager.exhibition_config.games.keys.each do |game_definition_key|
@@ -282,11 +282,26 @@ module AcpcTableManager
282
282
 
283
283
  def kill_matches!
284
284
  log __method__
285
+
286
+ Match.running.and.old(AcpcTableManager.config.match_lifespan_s).each do |m|
287
+ log(
288
+ __method__,
289
+ {
290
+ old_running_match_id_being_killed: m.id.to_s
291
+ }
292
+ )
293
+
294
+ kill_match! m.id.to_s
295
+ end
296
+
285
297
  running_matches_array = @running_matches.to_a
286
298
  running_matches_array.each_index do |i|
287
299
  match_id, match_info = running_matches_array[i]
288
300
 
289
- unless (AcpcDealer::dealer_running?(match_info[:dealer]) && Match.id_exists?(match_id))
301
+ unless (
302
+ AcpcDealer::dealer_running?(match_info[:dealer]) &&
303
+ Match.id_exists?(match_id)
304
+ )
290
305
  log(
291
306
  __method__,
292
307
  {
@@ -1,3 +1,3 @@
1
1
  module AcpcTableManager
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acpc_table_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Morrill