Added logs for cache refresh. #535
This commit is contained in:
parent
1101e025a5
commit
b730e9b43a
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue