Update sys.php

This commit is contained in:
Anyon 2020-09-19 18:43:58 +08:00
parent 3d0f8f5601
commit 4d38916456

View File

@ -26,6 +26,7 @@ app()->event->listen('HttpEnd', function () {
foreach (array_chunk($GLOBALS['oplogs'], 100) as $items) {
app()->db->name('SystemOplog')->insertAll($items);
}
$GLOBALS['oplogs'] = [];
app()->db->name('SystemOplog')->where('create_at', '<', strtotime('-7days'))->delete();
}
});