spree_cm_commissioner 2.12.4 → 2.12.5
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0228f6ca7b7b92d005af33e616b862a1ca576c9320b70510c7f235fbb058848
|
|
4
|
+
data.tar.gz: 66e3e4f595da2175c3fd0b06ca0c5712bb340b3fb8b9e1e1f71cd1495559dda9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a21bc63b5229c2ab198fa5d1d342b8375ed069d9a4cbee964243310a840a99acf9ab63b426defeca77b8f1f5511fcfa4fa8e5703c72fe580c06d53834452961
|
|
7
|
+
data.tar.gz: 71f6bd10a265ab1dd8c6ed0b30972105f3d2cfa332a2da3b6dfa347c8899eb1e97bb9962a6ff1c831b5cc3c6e3209409c435154e6cdc4f92a162191990bd2263
|
data/Gemfile.lock
CHANGED
|
@@ -9,8 +9,8 @@ module SpreeCmCommissioner
|
|
|
9
9
|
# Release at most this many guests per run, even when far more slots are free. A capacity spike
|
|
10
10
|
# (cold start / lull → active_sessions low → available_slots ≈ max_sessions, e.g. 900) would
|
|
11
11
|
# otherwise release every queued guest at once, dumping 900 simultaneous session-token requests
|
|
12
|
-
# on the server. Capping paces entry at ~MAX_CALLS_PER_RUN
|
|
13
|
-
# the rest stay queued and drain over the following runs.
|
|
12
|
+
# on the server. Capping paces entry at ~MAX_CALLS_PER_RUN per run (e.g. 30s, per
|
|
13
|
+
# config/schedule.yml); the rest stay queued and drain over the following runs.
|
|
14
14
|
MAX_CALLS_PER_RUN = (ENV['WAITING_ROOM_MAX_CALLS_PER_RUN'] || 50).to_i
|
|
15
15
|
|
|
16
16
|
def call
|
|
@@ -59,9 +59,21 @@ module SpreeCmCommissioner
|
|
|
59
59
|
previous_guests + eligible_guests_in(records_path, remaining_slots)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
# This query requires a composite index (allow_to_enter_room_at ==, position !=, queued_at
|
|
63
|
+
# order); create it in Firebase beforehand, same as the plain index #fetch_long_waiting_guests
|
|
64
|
+
# already needed.
|
|
65
|
+
#
|
|
66
|
+
# The position != nil filter closes the call-before-stamp race: without it, a doc could be
|
|
67
|
+
# called here before StampQueuePositions ever assigns it a position, permanently excluding it
|
|
68
|
+
# from #eligible_guests_in (every future run still sees allow_to_enter_room_at == nil, but the
|
|
69
|
+
# calling_all write below sets it non-nil for good) while still counting toward
|
|
70
|
+
# total_exited_queue's unscoped count. Gating on position != nil makes "already stamped" true
|
|
71
|
+
# by construction before a doc can ever be called, instead of relying on StampQueuePositions
|
|
72
|
+
# reliably beating this job to it (e.g. 10s vs. 30s — see cm-market-server/config/schedule.yml).
|
|
62
73
|
def eligible_guests_in(records_path, limit)
|
|
63
74
|
firestore.col(records_path)
|
|
64
75
|
.where('allow_to_enter_room_at', '==', nil)
|
|
76
|
+
.where('position', '!=', nil)
|
|
65
77
|
.order('queued_at')
|
|
66
78
|
.limit(limit)
|
|
67
79
|
.get.to_a
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_cm_commissioner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.12.
|
|
4
|
+
version: 2.12.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- You
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: spree
|