romanzipp / Laravel-Queue-Monitor

Monitoring Laravel Jobs with your Database
https://packagist.org/packages/romanzipp/laravel-queue-monitor
MIT License
693 stars 91 forks source link

Column 'data' on queue_monitoring not write #74

Closed trancongminh132 closed 2 years ago

trancongminh132 commented 3 years ago

Hi Currently, I see 'data' column is empty. Anyone can help? Thank you!

romanzipp commented 3 years ago

This is correct behavior. The data column is empty unless you are using the queueData() trait method. Could you please share some details about the expected and actual behavior, taken actions and mpossibly some code snippet?

trancongminh132 commented 3 years ago

@romanzipp Hi, you mean like this

public function handle()
    {
        $this->queueData(['foo' => 'Bar']);

        // WARNING! This is overriding the monitoring data
        $this->queueData(['bar' => 'Foo']);

        // To preserve previous data and merge the given payload, set the $merge parameter true
        $this->queueData(['bar' => 'Foo'], true);
    }
Restingo commented 3 years ago

Got the same error. I'm setting some testdata like

$this->queueData(['foo' => 'Bar']);

in the handle() method of my job and the column in the database stays empty.

romanzipp commented 3 years ago

Which Laravel version are you using?

Restingo commented 3 years ago

@romanzipp Laravel Framework 8.48.1