Skip to content

Commit 5e5c2fd

Browse files
committed
fix undefined key with queue
1 parent 9faa6f5 commit 5e5c2fd

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

services/Core/Jobs/Hm_BaseJob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ abstract class Hm_BaseJob extends Hm_Queueable implements Hm_Job
99
{
1010
public function __construct(protected array $data = []) {
1111
$this->data = $data;
12+
$this->driver = env('QUEUE_DRIVER');
1213
}
1314
}

services/Core/Notifications/Hm_Notification.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class Hm_Notification extends Hm_Queueable implements Hm_Dispatcher
2929
public function __construct($content = '')
3030
{
3131
$this->content = $content;
32+
$this->driver = env('QUEUE_DRIVER');
3233
}
3334
/**
3435
* Notifcations can be sent through multiple channels.
@@ -43,7 +44,7 @@ public function via(): array
4344
public function handle(): void
4445
{
4546
dump("Processing ".self::class);
46-
47+
4748
$this->sendNow();
4849
}
4950
public function failed(): void

services/Notifications/Hm_NewMailNotification.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,10 @@ class Hm_NewMailNotification extends Hm_Notification implements Hm_ShouldQueue
1111
{
1212
use Hm_Dispatchable, Hm_InteractsWithQueue;
1313

14-
public string $driver = 'redis';
15-
16-
// public function __construct(array $config = [])
17-
// {
18-
// parent::__construct($config);
19-
// }
14+
public string $driver = 'database';
2015

2116
public function via(): array
2217
{
23-
return ['telegram'];//, 'slack', 'telegram','broadcast'
18+
return ['telegram','slack'];//, 'slack', 'telegram','broadcast'
2419
}
2520
}

0 commit comments

Comments
 (0)