You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class SendShipmentNotification implements ShouldQueue
{
/** * The name of the connection the job should be sent to. * * @var string|null */public$connection = 'sqs';
/** * The name of the queue the job should be sent to. * * @var string|null */public$queue = 'listeners';
}
class ProcessPodcast implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** * Create a new job instance. */publicfunction__construct()
{
$this->onQueue('processing');
$this->onConnection('sqs');
}
}
Jobs do have the options to specify on runtime thru the same methods onQueue() & onConnection()
So my questions is, why do they differs? Any way we can standardize this? My use case is, to simply introduce a trait to customize these 2 props of all my related codes into the same queue.
Edit: Saw old thread on this but no clear reasoning #9869 (comment)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As mentioned in docs, here's for Listener
While this one is for Jobs
Jobs do have the options to specify on runtime thru the same methods
onQueue()
&onConnection()
So my questions is, why do they differs? Any way we can standardize this? My use case is, to simply introduce a trait to customize these 2 props of all my related codes into the same queue.
Edit: Saw old thread on this but no clear reasoning #9869 (comment)
Beta Was this translation helpful? Give feedback.
All reactions