GauaranteeCountJob.php 542 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace ln\jobs;
  3. use app\common\repositories\store\GuaranteeRepository;
  4. use ln\interfaces\JobInterface;
  5. use think\facade\Log;
  6. class GauaranteeCountJob implements JobInterface
  7. {
  8. public function fire($job, $data)
  9. {
  10. try{
  11. app()->make(GuaranteeRepository::class)->countGuarantee();
  12. $job->delete();
  13. }catch (\Exception $exception){
  14. Log::info($exception->getMessage());
  15. }
  16. }
  17. public function failed($data)
  18. {
  19. // TODO: Implement failed() method.
  20. }
  21. }