CheckQueueJob.php 1018 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\jobs;
  12. use crmeb\basic\BaseJobs;
  13. use crmeb\traits\QueueTrait;
  14. /**
  15. * 检测消息队列是否执行
  16. * Class CheckQueueJob
  17. * @package app\jobs
  18. */
  19. class CheckQueueJob extends BaseJobs
  20. {
  21. use QueueTrait;
  22. public function doJob($key)
  23. {
  24. $path = root_path('runtime') . '.queue';
  25. file_put_contents($path, $key);
  26. return true;
  27. }
  28. }