private function createOptimizeJob(string $handle, string $filePath, array $settings)
    {
        $queue = Craft::$app->getQueue();

        $jobId = $queue->push(new OptimizeJob([
            'description' => Craft::t('imager', 'Optimizing images ('.$handle.')'),
            'optimizer' => $handle,
            'optimizerSettings' => $settings,
            'filePath' => $filePath,
        ]));

        Craft::info('Created optimize job for '.$handle.' (job id is '.$jobId.')', __METHOD__);
    }
private function createOptimizeJob(string $handle, string $filePath, array $settings)
    {
        $queue = Craft::$app->getQueue();

        $jobId = $queue->push(new OptimizeJob([
            'description' => Craft::t('imager', 'Optimizing images ('.$handle.')'),
            'optimizer' => $handle,
            'optimizerSettings' => $settings,
            'filePath' => $filePath,
        ]));

        Craft::info('Created optimize job for '.$handle.' (job id is '.$jobId.')', __METHOD__);
    }
private function createOptimizeJob ( string $ handle , string $ filePath , array $ settings ) { $ queue = Craft :: $ app -> getQueue ( ) ; $ jobId = $ queue -> push ( new OptimizeJob ( [ 'description' => Craft :: t ( 'imager' , 'Optimizing images (' . $ handle . ')' ) , 'optimizer' => $ handle , 'optimizerSettings' => $ settings , 'filePath' => $ filePath , ] ) ) ; Craft :: info ( 'Created optimize job for ' . $ handle . ' (job id is ' . $ jobId . ')' , __METHOD__ ) ; }
Creates optimize queue job

@param string $handle
@param string $filePath
@param array  $settings
Creates optimize queue job