- Commande CheckAllScrapersHealth + handler avec ports dédiés - Value Object ContentSourceHealthCheckData - Resource API Platform et State Processor - Adapters InMemory et tests unitaires + fonctionnels
24 lines
668 B
PHP
24 lines
668 B
PHP
<?php
|
|
|
|
namespace App\Domain\Scraping\Infrastructure\ApiPlatform\Resource;
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\Post;
|
|
use App\Domain\Scraping\Infrastructure\ApiPlatform\State\Processor\CheckAllScrapersHealthStateProcessor;
|
|
|
|
#[ApiResource(
|
|
shortName: 'Scraping',
|
|
operations: [
|
|
new Post(
|
|
uriTemplate: '/scraping/check-all-health',
|
|
processor: CheckAllScrapersHealthStateProcessor::class,
|
|
output: false,
|
|
status: 202,
|
|
description: 'Déclenche le test de santé de tous les scrapers configurés avec testSlug',
|
|
),
|
|
]
|
|
)]
|
|
class CheckAllScrapersHealthResource
|
|
{
|
|
}
|