Skip to content

Commit 8df4691

Browse files
Add fallback values for job batches database config (#91)
1 parent 8697aa2 commit 8df4691

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Http/Controllers/ImportController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ private function createBlueprint(): Blueprint
217217
private function ensureJobBatchesTableExists(): bool
218218
{
219219
try {
220-
if (Schema::connection(config('queue.batching.database'))->hasTable(config('queue.batching.table'))) {
220+
if (Schema::connection(config('queue.batching.database', env('DB_CONNECTION', 'sqlite')))->hasTable(config('queue.batching.table', 'job_batches'))) {
221221
return true;
222222
}
223223
} catch (QueryException $e) {

src/Importer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static function run(Import $import): void
2121
{
2222
Cache::forget("importer.{$import->id}.parents");
2323

24-
if (! Schema::connection(config('queue.batching.database'))->hasTable(config('queue.batching.table'))) {
24+
if (! Schema::connection(config('queue.batching.database', env('DB_CONNECTION', 'sqlite')))->hasTable(config('queue.batching.table', 'job_batches'))) {
2525
throw new JobBatchesTableMissingException;
2626
}
2727

0 commit comments

Comments
 (0)