UserHistoryJob.php 578 B

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