feat(plugin): align with Shopware plugin guidelines
- add dedicated monolog channel aeon_dump_manager and log dump jobs - migrate services.xml/routes.php to YAML - require PHP ^8.2 - add extension icon and .config/shopware-extension.yml - drop empty lifecycle overrides Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
29974928d2
commit
8efaef2042
12 files changed
+155
-129
No files matched your search
@@ -5,6 +5,7 @@ namespace AeonDumpManager\MessageQueue\Handler;
|
||||
use AeonDumpManager\MessageQueue\Message\CreateDumpMessage;
|
||||
use AeonDumpManager\Service\DumpJobStatusService;
|
||||
use AeonDumpManager\Service\DumpService;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
||||
|
||||
#[AsMessageHandler]
|
||||
@@ -13,6 +14,7 @@ class CreateDumpHandler
|
||||
public function __construct(
|
||||
private readonly DumpService $dumpService,
|
||||
private readonly DumpJobStatusService $jobStatus,
|
||||
private readonly LoggerInterface $logger,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -20,10 +22,12 @@ class CreateDumpHandler
|
||||
{
|
||||
$jobId = $message->getJobId();
|
||||
$this->jobStatus->markRunning($jobId);
|
||||
$this->logger->info('Dump job started.', ['jobId' => $jobId]);
|
||||
|
||||
try {
|
||||
$this->dumpService->createAsync($jobId, $this->jobStatus);
|
||||
} catch (\Throwable $exception) {
|
||||
$this->logger->error('Dump job failed.', ['jobId' => $jobId, 'exception' => $exception]);
|
||||
$this->jobStatus->markFailed($jobId, $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user