Added logs for cache refresh. #535

This commit is contained in:
Korina Cordero 2021-02-09 02:58:22 +00:00
parent 1101e025a5
commit b730e9b43a

View file

@ -40,9 +40,14 @@ class RefreshLatestActiveJobOrderCacheCommand extends Command
protected function execute(InputInterface $input, OutputInterface $output)
{
// for logging purposes
$tmp_cache_log = fopen('/tmp/cache_logs.txt', 'a');
// remove all entries in cache
$this->jo_cache->clearLatestActiveJobOrderCache();
fwrite($tmp_cache_log, 'Cleared latest active jo cache...' . "\n");
$date = new DateTime();
$date->modify('-1 day');
@ -70,6 +75,9 @@ class RefreshLatestActiveJobOrderCacheCommand extends Command
$this->jo_cache->addLatestActiveJoborder($jo);
}
fwrite($tmp_cache_log, 'Refreshed latest active jo cache...' . "\n");
fclose($tmp_cache_log);
return 0;
}
}