CheckQueueJob.php 1.0 KB

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