XF 2.2 \XF::app()->jobManager()->enqueueUnique question

Scandal

Well-known member
Let's say that I have built my Scandals/AddonName/Job/MyJob.php class (extends AbstractJob ? ).
How can on an Admin Pub to make the job to be run?
I want to be able to see on the pub the redirecting phrases like Running...(100)...(200) etc.

I use this on an Admin Pub with no result:
PHP:
\XF::app()->jobManager()->enqueueUnique('MyJob_' . uniqid(), 'Scandals\AddonName:MyJob', [
                            'content_ids' => $userIds
                        ]);

I can see the entry on db table xf_job, but in reality I want to see "live" the process until completed.
I can't see nothing when visiting the admin pub where I have place the code.
 
Within the admin app (but not the public app), if you enqueue a manual job (unique jobs are manual by default) and return a redirect response, it should intercept the redirect to run your job before forwarding you to the original destination.
 
Top Bottom