Merge branch '535-display-open-jos-in-the-last-24-hours' into 'master'

Added logs for cache refresh. #535

Closes #535

See merge request jankstudio/resq!621
This commit is contained in:
Kendrick Chan 2021-02-09 03:05:31 +00:00
commit 085f0bd25c

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;
}
}