Fix creating new battles
All checks were successful
Push image to registry / build-image (push) Successful in 4m25s
All checks were successful
Push image to registry / build-image (push) Successful in 4m25s
This commit is contained in:
@ -165,10 +165,13 @@ class HellcaseBattlesJob extends HellcaseJob implements ShouldBeUniqueUntilProce
|
|||||||
private function createNewBattles() {
|
private function createNewBattles() {
|
||||||
foreach ($this->battlesToAdd as $battleLink => $battleValue) {
|
foreach ($this->battlesToAdd as $battleLink => $battleValue) {
|
||||||
$battleLink = explode("/", $battleLink);
|
$battleLink = explode("/", $battleLink);
|
||||||
HellcaseBattle::firstOrCreate([
|
try {
|
||||||
"battle_id" => $battleLink[count($battleLink) - 1],
|
HellcaseBattle::create([
|
||||||
"value" => $battleValue,
|
"battle_id" => $battleLink[count($battleLink) - 1],
|
||||||
]);
|
"value" => $battleValue,
|
||||||
|
]);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user