laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.54k stars 11.02k forks source link

Bus::batch gives incorrect information ? #42968

Closed ahmetbarut closed 2 years ago

ahmetbarut commented 2 years ago

Description:

Greetings, I'm trying to use Bus::batch to monitor the status of Queues but it gives wrong information about queue status. And it turned out to be -67, although the total row was 111?

Steps To Reproduce:

      // ImportController.php
        Bus::batch($queues)
            ->name('import-company')
            ->dispatch();
// InternshipImport.php

namespace App\Jobs;

use App\Models\City;
use App\Models\User;
use Illuminate\Bus\Batchable;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Collection;

class InternshipImport implements ShouldQueue
{
    use Batchable, Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $users;

    public $timeout = 150;

    public $tries = 25;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct(Collection $users)
    {
        $this->users = $users;
    }

    ...

Ekran Resmi 2022-06-27 14 35 09

driesvints commented 2 years ago

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!

ahmetbarut commented 2 years ago

@driesvints I asked for help with this problem in the channels you specified, but since there was no response, I opened the problem here.

driesvints commented 2 years ago

Please share some of the links where you asked help.