Update sys.php

This commit is contained in:
Anyon 2020-09-19 21:52:25 +08:00
parent 20f56f2200
commit da666da9ab

View File

@ -27,7 +27,8 @@ app()->event->listen('HttpEnd', function () {
app()->db->name('SystemOplog')->insertAll($items);
}
$GLOBALS['oplogs'] = [];
app()->db->name('SystemOplog')->where('create_at', '<', strtotime('-7days'))->delete();
$lastdate = date('Y-m-d H:i:s', strtotime('-7days'));
app()->db->name('SystemOplog')->where('create_at', '<', $lastdate)->delete();
}
});