Parcourir la source

Modified some files

Jean Sumara Leopoldo il y a 5 ans
Parent
commit
ee9a4bc16b
3 fichiers modifiés avec 3 ajouts et 8 suppressions
  1. 0 3
      bin/console
  2. 1 4
      index.php
  3. 2 1
      src/App/Listener/StatsConsumerListener.php

+ 0 - 3
bin/console

@@ -10,9 +10,6 @@ use Flowdat\Stats\Command\Zte\ZteOltScanCommand;
 use Flowdat\Stats\Command\Zte\ZteOnuScanCommand;
 use Symfony\Component\Console\Application;
 
-$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
-$dotenv->load();
-
 $application = new Application();
 $application->add(new HuaweiOltScanCommand());
 $application->add(new HuaweiOnuScanCommand());

+ 1 - 4
index.php

@@ -4,12 +4,9 @@ use Flowdat\Stats\App\Listener\StatsConsumerListener;
 
 require __DIR__ . '/vendor/autoload.php';
 
-$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
-$dotenv->load();
-
 $listener = new StatsConsumerListener();
 try {
     $listener->run();
 } catch (Exception $e) {
-
+    throw new Exception($e->getMessage());
 }

+ 2 - 1
src/App/Listener/StatsConsumerListener.php

@@ -19,7 +19,7 @@ class StatsConsumerListener
     }
 
     public function run(){
-        echo 'Running listener';
+        echo 'Running listener111';
 
         $callbackMessage = function($msg) {
             $msgBody = unserialize($msg->body);
@@ -49,6 +49,7 @@ class StatsConsumerListener
                     $consolePath = getcwd().'/bin/console';
                     $command = $name . ' ' . implode(' ', $input);
                     $execute = $consolePath.' '.$command;
+                    echo $execute;
                 }
 
                 try {