added test for channel 2

This commit is contained in:
2026-07-07 16:35:14 +03:30
parent 3ff11dcd75
commit 1f75f5986f
3 changed files with 47 additions and 10 deletions
+3 -5
View File
@@ -86,12 +86,10 @@ class LivePriceTickService
app(LivePriceCacheService::class)->markTick();
// last از put داخل lastPrice؛ list بعد از sync محصولات
$listChanged = app(PriceBroadcastService::class)->broadcastListIfChanged();
app(PriceBroadcastService::class)->broadcastListIfChanged();
// بعد از هر تغییر قیمت، قیمت‌ها را به کانال‌های پیام‌رسان بفرست (با cooldown داخلی)
if ($listChanged) {
app(PriceChannelBroadcastService::class)->broadcastIfEligible();
}
// ارسال قیمت به کانال‌ها — مستقل از SSE؛ تشخیص تغییر قیمت + cooldown داخل سرویس است
app(PriceChannelBroadcastService::class)->broadcastIfEligible();
} finally {
$lock->release();
}