Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -3,11 +3,8 @@
|
||||
namespace App\Notifications\Database;
|
||||
|
||||
use App\Models\ScheduledDatabaseBackup;
|
||||
use App\Notifications\Channels\DiscordChannel;
|
||||
use App\Notifications\Channels\TelegramChannel;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Channels\MailChannel;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
@@ -16,8 +13,11 @@ class BackupFailed extends Notification implements ShouldQueue
|
||||
use Queueable;
|
||||
|
||||
public $backoff = 10;
|
||||
|
||||
public $tries = 2;
|
||||
|
||||
public string $name;
|
||||
|
||||
public string $frequency;
|
||||
|
||||
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $output, public $database_name)
|
||||
@@ -41,6 +41,7 @@ class BackupFailed extends Notification implements ShouldQueue
|
||||
'frequency' => $this->frequency,
|
||||
'output' => $this->output,
|
||||
]);
|
||||
|
||||
return $mail;
|
||||
}
|
||||
|
||||
@@ -48,11 +49,13 @@ class BackupFailed extends Notification implements ShouldQueue
|
||||
{
|
||||
return "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was FAILED.\n\nReason:\n{$this->output}";
|
||||
}
|
||||
|
||||
public function toTelegram(): array
|
||||
{
|
||||
$message = "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was FAILED.\n\nReason:\n{$this->output}";
|
||||
|
||||
return [
|
||||
"message" => $message,
|
||||
'message' => $message,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,11 @@ class BackupSuccess extends Notification implements ShouldQueue
|
||||
use Queueable;
|
||||
|
||||
public $backoff = 10;
|
||||
|
||||
public $tries = 3;
|
||||
|
||||
public string $name;
|
||||
|
||||
public string $frequency;
|
||||
|
||||
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $database_name)
|
||||
@@ -37,6 +40,7 @@ class BackupSuccess extends Notification implements ShouldQueue
|
||||
'database_name' => $this->database_name,
|
||||
'frequency' => $this->frequency,
|
||||
]);
|
||||
|
||||
return $mail;
|
||||
}
|
||||
|
||||
@@ -44,12 +48,14 @@ class BackupSuccess extends Notification implements ShouldQueue
|
||||
{
|
||||
return "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was successful.";
|
||||
}
|
||||
|
||||
public function toTelegram(): array
|
||||
{
|
||||
$message = "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was successful.";
|
||||
ray($message);
|
||||
|
||||
return [
|
||||
"message" => $message,
|
||||
'message' => $message,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Notifications\Database;
|
||||
|
||||
use App\Models\ScheduledDatabaseBackup;
|
||||
use App\Notifications\Channels\DiscordChannel;
|
||||
use App\Notifications\Channels\TelegramChannel;
|
||||
use Illuminate\Bus\Queueable;
|
||||
@@ -29,22 +28,25 @@ class DailyBackup extends Notification implements ShouldQueue
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage();
|
||||
$mail->subject("Coolify: Daily backup statuses");
|
||||
$mail->subject('Coolify: Daily backup statuses');
|
||||
$mail->view('emails.daily-backup', [
|
||||
'databases' => $this->databases,
|
||||
]);
|
||||
|
||||
return $mail;
|
||||
}
|
||||
|
||||
public function toDiscord(): string
|
||||
{
|
||||
return "Coolify: Daily backup statuses";
|
||||
return 'Coolify: Daily backup statuses';
|
||||
}
|
||||
|
||||
public function toTelegram(): array
|
||||
{
|
||||
$message = "Coolify: Daily backup statuses";
|
||||
$message = 'Coolify: Daily backup statuses';
|
||||
|
||||
return [
|
||||
"message" => $message,
|
||||
'message' => $message,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user