1
0

AmqpConfig.php 736 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace components\service;
  3. class AmqpConfig
  4. {
  5. public $host = '127.0.0.1';
  6. public $port = 5672;
  7. public $user = 'guest';
  8. public $pass = 'Guest';
  9. public $vhost = '/';
  10. public $api_port = '15672';
  11. /* status */
  12. const STATUS_SEND_OK = 1;//已发送,待处理
  13. const STATUS_HAND = 2;//处理中
  14. const STATUS_HAND_OK = 10;//处理成功
  15. const STATUS_HAND_FAIL = 11;//处理失败
  16. public static $statusMark = [
  17. 0 => '未知状态',
  18. 1 => '已发送,待处理',
  19. 2 => '处理中',
  20. 10 => '处理成功',
  21. 11 => '处理失败',
  22. ];
  23. public static function getMarkById($id)
  24. {
  25. if (isset(self::$statusMark[$id]) && is_numeric($id)) {
  26. return self::$statusMark[$id];
  27. }
  28. return self::$statusMark[0];
  29. }
  30. }