Laravel queue, redirect after dispatch

تعرفه تبلیغات در سایت
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I have job class in my package. Function is simple but time consuming. I'd like send it to run in background.

    php artisan queue:work
    

    works.

    count = $count;
          $this->competition = $competition;
        }
    
        public function handle()
        {
    //code body
        }
    }
    

    and in controller

    dispatch((new StartLottery($count, $id))->onQueue('high'));
    

    My goal is run this job immediately in background and unlock browser to do another instructions like redirect.

    Unfortunately next things are doing after finish job. Finally user wait long time on response from server after his request.

    Thanks in advance for any hints how can I move this job to background.

    environment:

    • Laravel 5.4
    • php 5.6
    • debian 8
    asked 1 min ago
    jaroApp

  • مطالب مرتبط
  • WordPress Loop and some extra PHP to execute a code after every 4 posts
  • Laravel Model Accessor and Mutator with wildcard (*)
  • windowSoftInputMode=“adjustResize” not working after changing visibility of child
  • Laravel Eloquent date_format Validation fails on given format
  • Redirect rule not working
  • Weblogic doesn't refresh stateless EJB after redeploy
  • نویسنده : استخدام کار بازدید : 7 تاريخ : دوشنبه 27 شهريور 1396 ساعت: 1:53
    برچسب‌ها :