Remove CommProtocolReceive commands, Remove protocol onConnect() functions, pass Setup::class to protocols
This commit is contained in:
@@ -10,6 +10,7 @@ use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\ManuallyFailedException;
|
||||
use Illuminate\Queue\MaxAttemptsExceededException;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
|
||||
@@ -85,6 +86,7 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
|
||||
}
|
||||
|
||||
Log::info(sprintf('%s:- Polling [%s] - attempt [%d]',self::LOGKEY,$this->ao->ftn,$this->attempts()));
|
||||
$setup = Config::get('setup',Setup::findOrFail(config('app.id')));
|
||||
|
||||
foreach ($this->ao->system->mailer_preferred as $o) {
|
||||
// If we chose a protocol, skip to find the mailer details for it
|
||||
@@ -93,12 +95,12 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
|
||||
|
||||
switch ($o->name) {
|
||||
case 'BINKP':
|
||||
$s = new Binkp;
|
||||
$s = new Binkp($setup);
|
||||
|
||||
break;
|
||||
|
||||
case 'EMSI':
|
||||
$s = new EMSI;
|
||||
$s = new EMSI($setup);
|
||||
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user