mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
error mail notification for vacations
This commit is contained in:
1 parent
644dd00ee4
commit
f240da135e
3 files changed
+75
-1
No files matched your search
@@ -2,8 +2,10 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Mail\Error;
|
||||
use App\Services\Intranet\IntranetService;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class SyncVacationsFromIntranet extends Command
|
||||
{
|
||||
@@ -30,7 +32,14 @@ class SyncVacationsFromIntranet extends Command
|
||||
{
|
||||
$intranetService = new IntranetService();
|
||||
|
||||
$intranetService->syncVacations();
|
||||
try {
|
||||
$intranetService->syncVacations();
|
||||
} catch (\Exception $e) {
|
||||
Mail::to('feher@studiotem.com')->send(new Error($e));
|
||||
|
||||
return Command::FAILURE;
|
||||
}
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user