Laravel Job calling repository falling in exceeded time

Viewed 21

I've a job which uses a repository

    public function handle()
    {
...
// all dd() i use here are OK, no exceeded time
...
    $annuaireRepository = new AnnuaireRepository();
        $liste = $annuaireRepository->find('vcard', '', 0, '', '', '', '');
// dd() not displaying, exceeded time
...
}

And the repository

    public function find($requete, $type, $champ1, $champ2, $total, $page_courante, $nombre_resultat_page)
...
// all dd() i use here are OK, no exceeded time
...
        DB::connection('sqlsrv_database')
                    ->raw("SET NOCOUNT ON;");
        $queryDatas = DB::connection('sqlsrv_database')
...
// all dd() i use here are OK, no exceeded time
...
            ->select($select)
            ;
// dd() not displaying, exceeded time

        return collect($queryDatas);
    }

The exceeded time occurs with the ->select($select) in the repository

But it happens only with the job.

I use the repository in another controller and all is fine.

Some idea ?

0 Answers
Related