CheckProductPresellJob.php 614 B

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