MacsiDigital / laravel-zoom

Laravel Zoom Package
MIT License
260 stars 135 forks source link

dont work with queue/job with database driver #129

Open mjzavar opened 1 year ago

mjzavar commented 1 year ago

hi i use this package to create zoom meetings and it works fine now i need to repeat meetings on daily bases , so i created a job and call that job via scheduler

protected function schedule(Schedule $schedule)
{
    $schedule->job(new ZoomJob())->everyMinute();
}

in my ZoomJob i have simple request to get a user and log it in database ApiReport table

public function handle()
{
    $user =  Zoom::user()->find("myuser@gmail.com");
    ApiReport::create([
        'title' =>'zoom getUser' ,
        'data' => json_encode([
            'user' => $user
        ])
    ]);
}

i was surprised to find my user in db log is null , after playing around with my code i found that if i change my queue driver to sync it works fine and i get the user ... but if i set the driver to database it wont work

any idea why this is happening ?