Error log cuotas

This commit is contained in:
2023-10-19 19:10:08 -03:00
parent 850a475ef6
commit ada0434caf
2 changed files with 7 additions and 1 deletions

View File

@ -37,7 +37,11 @@ class Cuotas
{
$output = [];
try {
$benchmark = [
'start' => microtime(true)
];
$cuotas = $cuotaRepository->fetchDatosPorVencer();
$benchmark['cuotas'] = microtime(true) - $benchmark['start'];
foreach ($cuotas as $row) {
$fecha = $row['Fecha'];
$date = new DateTimeImmutable($fecha);
@ -61,6 +65,8 @@ class Cuotas
});
$output[$key] = $day;
}
$benchmark['run'] = microtime(true) - $benchmark['start'];
error_log(var_export($benchmark,true));
} catch (EmptyResult) {}
return $this->withJson($response, ['cuotas' => $output]);
}