diff --git a/app/Console/Commands/Grapper/TxOdds/Odds/Tools/ActiveSpread.php b/app/Console/Commands/Grapper/TxOdds/Odds/Tools/ActiveSpread.php index 5fc6d400..84ed20f4 100644 --- a/app/Console/Commands/Grapper/TxOdds/Odds/Tools/ActiveSpread.php +++ b/app/Console/Commands/Grapper/TxOdds/Odds/Tools/ActiveSpread.php @@ -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'])) {