if monthly archive defined, allow up to ~1 month old uptime date
This commit is contained in:
parent
f03ab5065c
commit
d5471d6237
|
@ -66,7 +66,12 @@ class UptimeArchiver implements ArchiverInterface
|
|||
public function archive($server_id = null)
|
||||
{
|
||||
// WIP, create more dynamic by config, temp use config.php
|
||||
$latest_date = new \DateTime('-1 week 0:0:0');
|
||||
|
||||
if(PSM_UPTIME_ARCHIVE == 'monthly'){
|
||||
$latest_date = new \DateTime('-1 month 0:0:0');
|
||||
}else{
|
||||
$latest_date = new \DateTime('-1 week 0:0:0');
|
||||
}
|
||||
|
||||
// Lock tables to prevent simultaneous archiving (by other sessions or the cron job)
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue