feat(setup preprod)

This commit is contained in:
2026-04-10 12:16:18 +02:00
parent 59017a2c9b
commit e00f6d1b47
4 changed files with 40 additions and 19 deletions

View File

@@ -63,7 +63,6 @@ class SyncDolibarrMembers extends Command
[
'status' => $memberStatuses[$member['status']] ?? 'draft',
'nature' => 'physical',
'member_type' => $member['type'],
'group_id' => null,
'lastname' => $member['lastname'],
'firstname' => $member['firstname'],

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Support;
use Illuminate\Support\Facades\Cache;
use Symfony\Component\Console\Output\Output;
class CacheLineOutput extends Output
{
public function __construct(private readonly string $cacheKey)
{
parent::__construct(self::VERBOSITY_NORMAL);
}
protected function doWrite(string $message, bool $newline): void
{
$current = Cache::get($this->cacheKey, []);
$clean = preg_replace('/\x1b\[[0-9;]*m/', '', $message);
$current['output'] = ($current['output'] ?? '').$clean.($newline ? "\n" : '');
Cache::put($this->cacheKey, $current, now()->addHour());
}
}