CheckProductExtensionJob.php 658 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020-05-08
  7. *
  8. *
  9. */
  10. namespace crmeb\jobs;
  11. use crmeb\interfaces\JobInterface;
  12. use think\facade\Log;
  13. use think\queue\Job;
  14. use app\common\repositories\store\product\ProductRepository;
  15. class CheckProductExtensionJob implements JobInterface
  16. {
  17. public function fire($job, $data)
  18. {
  19. try{
  20. app()->make(ProductRepository::class)->checkProductByExtension();
  21. $job->delete();
  22. }catch (\Exception $exception){
  23. Log::info(var_export($exception, 1));
  24. }
  25. }
  26. public function failed($data)
  27. {
  28. // TODO: Implement failed() method.
  29. }
  30. }