25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 년 전
123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * 文件MQ
  4. *
  5. * - 队列存放于本地文件 中,不支持分布式MQ
  6. *
  7. * @author dogstar <chanzonghuang@gmail.com> 20150516
  8. */
  9. class Task_MQ_File extends Task_MQ_KeyValue {
  10. public function __construct(PhalApi_Cache_File $fileCache = NULL) {
  11. if ($fileCache === NULL) {
  12. $config = DI()->config->get('app.Task.mq.file');
  13. if (!isset($config['path'])) {
  14. $config['path'] = API_ROOT . '/Runtime';
  15. }
  16. if (!isset($config['prefix'])) {
  17. $config['prefix'] = 'phalapi_task';
  18. }
  19. $fileCache = new PhalApi_Cache_File($config);
  20. }
  21. parent::__construct($fileCache);
  22. }
  23. }