msassa
4 months ago

Chaining jobs doesn't work for me

Posted 4 months ago by msassa

Hi everyone. I have this problem: i'm trying to chain some jobs, but doesn't seem to works or I'm not doing it the right way.

I have two jobs, and I call it this way:

MakeReplacements::withChain(
    [
        new CleanTenantCache(config('tenant.slug')),
    ]
)->dispatch($request->ids, config('tenant.slug'));

I try this way too:

MakeReplacements::dispatch($request->ids, config('tenant.slug'))->chain(
    [
        new CleanTenantCache(config('tenant.slug')),
    ]
);

And only execute the first job MakeReplacements:

[2019-05-07 22:30:06][102] Processing: App\Jobs\MakeReplacements

[2019-05-07 22:30:07][102] Processed: App\Jobs\MakeReplacements

Any idea, please.

Please sign in or create an account to participate in this conversation.