In the past, I have done the following:
- Create a queued job in APP1 with an empty handler.
- Running jobs in a queue in APP1
- Create a queued job in APP2 with a populated handler.
- APP2 (
php artisan queue:listen )
APP1. :
\Queue::push(new \App\Jobs\EventToBeWorkedOnInApp1());
class EventToBeWorkedOnInApp1 extends Job implements SelfHandling, ShouldQueue
{
use SerializesModels;
public function handle()
{
}
(...)
APP2 # APP2
class EventToBeWorkedOnInApp1 extends Job implements SelfHandling, ShouldQueue
{
use SerializesModels;
public function handle()
{
}
(...)