spree_cm_commissioner 2.13.1 → 2.13.2
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: 7c3bda3e011d6d81a2efce6c425673eafe576265fff3622d9d33134412b9ef8a
|
|
4
|
+
data.tar.gz: 38694b945396bbef5db96d065b9aabfe3da3b114a1769d16e1999969b4019215
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c34f6c30a980c3bf941d3b2ca569e603b27f8ee6020fa2369142ae8b52a909716f549820dd3aa189d5e1b7d095488c5e193dc41206b0ef2e6f7b9b8684e37e3
|
|
7
|
+
data.tar.gz: 36673f6411111297fb715c4280ac5d44a0c2c55576c377d4a68b5fb72d887060d585863a1abbbca1b2b53a0184a288317c00185fec722ec466c3bd7b23e95348
|
data/Gemfile.lock
CHANGED
|
@@ -165,10 +165,22 @@ module SpreeCmCommissioner
|
|
|
165
165
|
# the lobby pointer flips) into a single query, matching #fetch_long_waiting_guests's guard.
|
|
166
166
|
# Order matters for read count only (not correctness): yesterday-first exits after one read on
|
|
167
167
|
# the cross-midnight stragglers the caller drains first.
|
|
168
|
+
#
|
|
169
|
+
# left_at == nil matters as much here as it does in #eligible_guests_in: without it, any doc
|
|
170
|
+
# that was never admitted -- including every guest who already left the queue on their own or
|
|
171
|
+
# got swept, the overwhelmingly common case in a partition with real traffic -- reads as "still
|
|
172
|
+
# waiting" forever. That's what was making has_queue stick at true even with nobody left in
|
|
173
|
+
# line, needlessly forcing every fresh arrival into the queue (see shouldQueue on the client).
|
|
174
|
+
#
|
|
175
|
+
# No new composite index needed: (allow_to_enter_room_at ==, left_at ==) is a leading prefix of
|
|
176
|
+
# the (allow_to_enter_room_at ==, left_at ==, last_ping_at ==) index already tracked in
|
|
177
|
+
# firebase/firestore.indexes.json, and Firestore serves a query off a prefix of an existing
|
|
178
|
+
# composite index for free.
|
|
168
179
|
def waiting_exists?(records_paths)
|
|
169
180
|
records_paths.uniq.any? do |records_path|
|
|
170
181
|
firestore.col(records_path)
|
|
171
182
|
.where('allow_to_enter_room_at', '==', nil)
|
|
183
|
+
.where('left_at', '==', nil)
|
|
172
184
|
.limit(1)
|
|
173
185
|
.get.any?
|
|
174
186
|
end
|