request_id, add cli args for prefix

This commit is contained in:
xiaomlove
2021-06-01 15:50:17 +08:00
parent ec7104e5e8
commit 0b839c5970
4 changed files with 15 additions and 4 deletions
+2 -3
View File
@@ -6,7 +6,6 @@
*/
require "bittorrent.php";
require "cleanup.php";
$fd = fopen(sprintf('%s/nexus_cleanup_cli.lock', sys_get_temp_dir()), 'w+');
if (!flock($fd, LOCK_EX|LOCK_NB)) {
@@ -17,8 +16,8 @@ register_shutdown_function(function () use ($fd) {
});
try {
docleanup(0, true);
do_log("[CLEANUP_CLI DONE!]");
$result = autoclean();
do_log("[CLEANUP_CLI DONE!] $result");
} catch (\Exception $exception) {
do_log("ERROR: " . $exception->getMessage());
throw new \RuntimeException($exception->getMessage());