mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-22 10:57:27 +08:00
add cli force
This commit is contained in:
@@ -15,8 +15,13 @@ register_shutdown_function(function () use ($fd) {
|
||||
fclose($fd);
|
||||
});
|
||||
|
||||
$force = 0;
|
||||
if (isset($_SERVER['argv'][1])) {
|
||||
$force = $_SERVER['argv'][1] ? 1 : 0;
|
||||
}
|
||||
|
||||
try {
|
||||
$result = autoclean();
|
||||
$result = autoclean($force, true);
|
||||
do_log("[CLEANUP_CLI DONE!] $result");
|
||||
} catch (\Exception $exception) {
|
||||
do_log("ERROR: " . $exception->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user