SyncQueueStatusJob.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\jobs;
  12. use crmeb\interfaces\JobInterface;
  13. use think\facade\Cache;
  14. use think\facade\Log;
  15. use think\queue\Job;
  16. class SyncQueueStatusJob implements JobInterface
  17. {
  18. public function fire($job, $data)
  19. {
  20. $key =env('APP_KEY','merchant').'_queue_status';
  21. Cache::set($key,time(),360);
  22. $job->delete();
  23. }
  24. public function failed($data)
  25. {
  26. // TODO: Implement failed() method.
  27. }
  28. }