CSV import job is not executed

I've made an importer:
<?php

namespace App\Filament\Imports;

use App\Models\Invitee;
use Filament\Actions\Imports\ImportColumn;
use Filament\Actions\Imports\Importer;
use Filament\Actions\Imports\Models\Import;

class InviteeImporter extends Importer
{
    protected static ?string $model = Invitee::class;
// etc


Now i added this import button to a relationmanager (Invitee)

When clicking the button, the modal appears, i can map my fields and then i get the noficiation that the Job is running on the background.

I have my queue_driver on SYNC, so that it should run directly.

After digging a little deeper, i found the trait that dispatches the job and sends the notification to the database.
Filament\Actions\Concerns\CanImportRecords


Starting on line 183
$importChunkIterator = new ChunkIterator($csvResults->getRecords(), chunkSize: $action->getChunkSize());

            /** @var array<array<array<string, string>>> $importChunks */
            $importChunks = $importChunkIterator->get();

            $job = $action->getJob();

            $options = array_merge(
                $action->getOptions(),
                Arr::except($data, ['file', 'columnMap']),
            );

            $importJobs = collect($importChunks)
                ->map(fn (array $importChunk): object => new ($job)(
                    $import,
                    rows: $importChunk,
                    columnMap: $data['columnMap'],
                    options: $options,
                ));

            Bus::batch($importJobs->all())


$importJob->all()
is always empty for some reason.


The imports table in the database recieves the records, they are there.

I'm not sure where to look now. Any idea's?
Was this page helpful?