require redis and use reids to check ReAnnounce

This commit is contained in:
xiaomlove
2022-02-19 23:19:09 +08:00
parent 80bf8a29ff
commit f2f873e1e7
11 changed files with 53 additions and 40 deletions
+2
View File
@@ -10,8 +10,10 @@ require "bittorrent.php";
$fd = fopen(sprintf('%s/nexus_cleanup_cli.lock', sys_get_temp_dir()), 'w+');
if (!flock($fd, LOCK_EX|LOCK_NB)) {
do_log("can not get lock, skip!");
exit();
}
register_shutdown_function(function () use ($fd) {
flock($fd, LOCK_UN);
fclose($fd);
});