Explorar el Código

add messenger

Olivier Massot hace 3 años
padre
commit
d306b7746e
Se han modificado 3 ficheros con 17 adiciones y 6 borrados
  1. 1 1
      .env
  2. 5 5
      config/packages/messenger.yaml
  3. 11 0
      src/Message/ExportRequestMessage.php

+ 1 - 1
.env

@@ -62,7 +62,7 @@ WKHTMLTOIMAGE_PATH=/usr/local/bin/wkhtmltoimage
 
 ###> symfony/messenger ###
 # Choose one of the transports below
-# MESSENGER_TRANSPORT_DSN=doctrine://default
+MESSENGER_TRANSPORT_DSN=doctrine://default
 # MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
 # MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
 ###< symfony/messenger ###

+ 5 - 5
config/packages/messenger.yaml

@@ -1,14 +1,14 @@
 framework:
     messenger:
         # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
-        # failure_transport: failed
+        failure_transport: failed
 
         transports:
             # https://symfony.com/doc/current/messenger.html#transport-configuration
-            # async: '%env(MESSENGER_TRANSPORT_DSN)%'
-            # failed: 'doctrine://default?queue_name=failed'
-            # sync: 'sync://'
+            async: '%env(MESSENGER_TRANSPORT_DSN)%'
+            failed: 'doctrine://default?queue_name=failed'
+            sync: 'sync://'
 
         routing:
             # Route your messages to the transports
-            # 'App\Message\YourMessage': async
+            'App\Message\ExportRequestMessage': async

+ 11 - 0
src/Message/ExportRequestMessage.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace App\Message;
+
+/**
+ * Transmission d'une ExportRequest à son service d'export
+ */
+class ExportRequestMessage
+{
+
+}