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:
commit
085f0bd25c
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