feat: scraping endpoints, job persistence, firsts unit tests, legacy entities usage

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-07 11:56:51 +01:00
parent c55cd62ec7
commit 0374ab0e46
34 changed files with 348 additions and 326 deletions

View File

@@ -1,22 +1,40 @@
framework:
messenger:
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed
default_bus: command.bus
# Transports
transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
async:
commands:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
retry_strategy:
max_retries: 0
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
options:
queue_name: commands
events:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
queue_name: events
# Buses configuration
buses:
command.bus:
middleware:
- validation
- doctrine_transaction
event.bus:
default_middleware: allow_no_handlers
# Message routing
routing:
# Route your messages to the transports
'App\Message\DownloadChapter': async
'App\Message\RefreshMetadata': async
App\Message\RefreshAndDownloadChapters: async
# Commands
'App\Domain\Scraping\Application\Command\ScrapeChapter': commands
# Events
'App\Domain\Scraping\Domain\Event\ChapterScrapingStarted': events
'App\Domain\Scraping\Domain\Event\ChapterScrapingCompleted': events
'App\Domain\Scraping\Domain\Event\ChapterScrapingFailed': events
# Legacy messages (à garder si nécessaire)
'App\Message\DownloadChapter': commands
'App\Message\RefreshMetadata': commands
'App\Message\RefreshAndDownloadChapters': commands
# when@test:
# framework:

View File

@@ -92,3 +92,7 @@ services:
App\Service\Scraper\MangaScraperService:
arguments:
$scraperFactory: '@App\Service\Scraper\ScraperFactory'
App\Domain\Scraping\Infrastructure\Handler\SymfonyScrapeChapterHandler:
tags:
- { name: messenger.message_handler, bus: command.bus }