RetryController.php 790 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: shenyang
  5. * Date: 2018/11/17
  6. * Time: 11:14 PM
  7. */
  8. namespace app\backend\modules\queue\controllers;
  9. use app\common\components\BaseController;
  10. use app\common\exceptions\AppException;
  11. use Illuminate\Support\Facades\Artisan;
  12. class RetryController extends BaseController
  13. {
  14. public $transactionActions = ['*'];
  15. public function all()
  16. {
  17. ini_set ('memory_limit', '512M');
  18. $a = Artisan::call('queue:retry', ['id' => ['all']]);
  19. dump($a);
  20. }
  21. /**
  22. * @throws AppException
  23. */
  24. public function ids(){
  25. if(!request('ids')){
  26. throw new AppException('缺少ids参数');
  27. }
  28. $a = Artisan::call('queue:retry', ['id' => explode(',',request('ids'))]);
  29. dump($a);
  30. }
  31. }