-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(slack): fixed and tested with queue work
- Loading branch information
Showing
10 changed files
with
83 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
use Services\Jobs\Hm_ProcessNewEmail; | ||
use Services\Core\Commands\Hm_BaseCommand; | ||
use Services\Notifications\Hm_NewMailNotification; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
@@ -32,7 +33,14 @@ protected function configure() | |
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
$this->info("Checking for new mail..."); | ||
Hm_ProcessNewEmail::dispatch(email: '[email protected]'); | ||
$message = "Hello! You have a new mail on test@entreprise server."; | ||
|
||
// $notification = (new Hm_NewMailNotification()) | ||
// ->greeting('New Mail Alert') | ||
// ->line($message); | ||
// $notification->sendNow(); | ||
Hm_NewMailNotification::dispatch($message); | ||
// Hm_ProcessNewEmail::dispatch(email: '[email protected]'); | ||
return Command::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Services; | ||
|
||
use Services\Core\Scheduling\Hm_Scheduler; | ||
|
||
class Hm_Kernel | ||
{ | ||
protected $scheduler; | ||
|
||
public function __construct(Hm_Scheduler $scheduler) | ||
{ | ||
$this->scheduler = $scheduler; | ||
|
||
} | ||
|
||
/** | ||
* Define the application's command schedule. | ||
*/ | ||
public function schedule() | ||
{ | ||
// Register tasks with the scheduler | ||
$this->scheduler->command('check:mail') | ||
->everyMinute() | ||
->withoutOverlapping(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters