add DB::transaction to catch looked query

This commit is contained in:
salam committed 2026-02-16 10:02:07 +01:00
1 parent f1b0f43ded
commit 65dc70e681
38 files changed
+218 -266

No files matched your search

@@ -8,7 +8,6 @@ use App\Models\OddsDc;
use App\Models\OddsGgng;
use App\Models\OddsTotal;
use App\Models\OddsTq;
use App\Utilities\DatabaseFunctions;
use App\Utilities\Margin;
class Soccer
@@ -94,8 +93,9 @@ class Soccer
$res->a3w = number_format($_3way['a3w'], 2);
$res->flags = 1;
$res->margin = $_3way['margin'];
DatabaseFunctions::save_update($res);
DB::transaction(function () use ($res) {
$res->save();
}, 5);
}
}
@@ -120,8 +120,9 @@ class Soccer
$res->under = number_format($_total['under'], 2);
$res->flags = 1;
$res->margin = $_total['margin'];
DatabaseFunctions::save_update($res);
DB::transaction(function () use ($res) {
$res->save();
}, 5);
}
}
@@ -141,8 +142,9 @@ class Soccer
$res->ng = number_format($_ggng['ng'], 2);
$res->flags = 1;
$res->margin = $_ggng['margin'];
DatabaseFunctions::save_update($res);
DB::transaction(function () use ($res) {
$res->save();
}, 5);
}
}
@@ -163,8 +165,9 @@ class Soccer
$res->dcx2 = number_format($_dc['dcx2'], 2);
$res->flags = 1;
$res->margin = $_dc['margin'];
DatabaseFunctions::save_update($res);
DB::transaction(function () use ($res) {
$res->save();
}, 5);
}
}
@@ -184,8 +187,9 @@ class Soccer
$res->atq = number_format($_tq['atq'], 2);
$res->flags = 1;
$res->margin = $_tq['margin'];
DatabaseFunctions::save_update($res);
DB::transaction(function () use ($res) {
$res->save();
}, 5);
}
}