console.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. ?>
  10. <?php
  11. $modules = [];
  12. foreach (glob(__DIR__ . '/modules/*.php') as $filename) {
  13. $modules = array_merge($modules, require($filename));
  14. }
  15. return [
  16. 'modules'=>$modules,
  17. 'params' => [
  18. 'appName' => 'console',
  19. ],
  20. //配置RabbitMq 部分
  21. /*
  22. 'bootstrap' => [
  23. 'queue', // The component registers own console commands
  24. ],
  25. 'components' => [
  26. 'queue' => [
  27. //'class' => \zhuravljov\yii\queue\amqp\Queue::class,
  28. //'class' => 'zhuravljov\yii\queue\amqp\Queue',
  29. 'class' => 'fecshop\app\console\modules\Amqp\block\Queue',
  30. 'host' => 'localhost',
  31. 'port' => 5672,
  32. 'user' => 'mqadmin',
  33. 'password' => 'mqadmin20177',
  34. //'queueName' => 'queue',
  35. 'queueName' => 'productDropshipQN',
  36. 'exchangeName' => 'productDropshipEX',
  37. 'routingKey' => 'productDropshipRT',
  38. ],
  39. ],
  40. */
  41. ];