ActiveSpread add tranaction catch deadlock

This commit is contained in:
salam committed 2026-02-27 09:52:40 +01:00
1 parent 34f131e068
commit 2f02d61fdd
1 file changed
+3 -1
@@ -37,7 +37,9 @@ class ActiveSpread
{
foreach (self::$collector as $table => $value) {
DB::table($table)->where('event_id', $event_id)->where('bookmaker_id', $bookmaker_id)->update(['active_spread' => 0]);
DB::transaction(function () use ($table, $event_id, $bookmaker_id) {
DB::table($table)->where('event_id', $event_id)->where('bookmaker_id', $bookmaker_id)->update(['active_spread' => 0]);
}, 5);
if (in_array($table, ['odds_points', 'odds_points_ht', 'odds_points_q1'])) {