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,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\CustomerHostingOrder;
|
||||
use App\Jobs\ProvisionHostingOrderJob;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class RetryPendingHostingFulfillmentCommand extends Command
|
||||
{
|
||||
protected $signature = 'hosting:retry-pending-fulfillment {--limit=50 : Maximum orders to process}';
|
||||
|
||||
protected $description = 'Re-queue provisioning for hosting orders held after an upstream failure (e.g. Contabo balance)';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
$limit = max(1, (int) $this->option('limit'));
|
||||
|
||||
$orders = CustomerHostingOrder::query()
|
||||
->where('status', CustomerHostingOrder::STATUS_PENDING_APPROVAL)
|
||||
->whereNotNull('meta->provisioning_hold')
|
||||
->with('product')
|
||||
->latest('id')
|
||||
->limit($limit)
|
||||
->get();
|
||||
|
||||
$queued = 0;
|
||||
|
||||
foreach ($orders as $order) {
|
||||
$order->update([
|
||||
'status' => CustomerHostingOrder::STATUS_APPROVED,
|
||||
'approved_at' => now(),
|
||||
]);
|
||||
ProvisionHostingOrderJob::dispatch($order->fresh());
|
||||
$queued++;
|
||||
$this->line("Queued provisioning for order #{$order->id} ({$order->domain_name})");
|
||||
}
|
||||
|
||||
$this->info("Queued {$queued} order(s) for reprovisioning.");
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user