Initial Ladill Hosting app with Gitea deploy pipeline.
Deploy Ladill Hosting / deploy (push) Failing after 17s
Deploy Ladill Hosting / deploy (push) Failing after 17s
Shared web hosting extracted from the platform monolith, with CI deploy to /var/www/ladill-hosting matching Bird/Domains/Email. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\Domain;
|
||||
use App\Services\Dns\PowerDnsClient;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ProvisionDomainSlaveZoneJob implements ShouldQueue
|
||||
{
|
||||
use Dispatchable;
|
||||
use InteractsWithQueue;
|
||||
use Queueable;
|
||||
use SerializesModels;
|
||||
|
||||
public int $tries = 3;
|
||||
|
||||
public int $backoff = 90;
|
||||
|
||||
public function __construct(public int $domainId)
|
||||
{
|
||||
}
|
||||
|
||||
public function handle(PowerDnsClient $client): void
|
||||
{
|
||||
$domain = Domain::query()->find($this->domainId);
|
||||
if (!$domain || !$domain->isActiveForMail()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$masters = config('pdns.slave_masters', []);
|
||||
$client->ensureSlaveZone($domain, $masters);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user