Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit af4e115

Browse files
committed
✨ 增加了检查文件策略(虽然现在只支持hash)
1 parent fd854ec commit af4e115

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ $config=[
5858
"public_port"=> 4000,//服务端口
5959
"CLUSTER_ID"=> "",
6060
"CLUSTER_SECRET"=> "",
61+
],
62+
"file"=> [
6163
"cache_dir"=> "./cache",//缓存文件夹
62-
"keepalive"=> 60,//间隔keepalive时间,秒为单位
64+
"check"=> "hash",//检查文件策略(hash:检查文件hash size:检查文件大小 exists:检查文件是否存在)
6365
],
6466
"advanced"=> [
65-
"MaxConcurrent"=> 10,//下载使用的线程
66-
"Debug"=> false,//Debug开关
67+
"keepalive"=> 60,//keepalive时间,秒为单位(不建议调整)
68+
"MaxConcurrent"=> 30,//下载使用的线程
69+
"Debug"=> true,//Debug开关
6770
],
6871
];
6972
```

config.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
"public_port"=> 4000,//服务端口
88
"CLUSTER_ID"=> "",
99
"CLUSTER_SECRET"=> "",
10+
],
11+
"file"=> [
1012
"cache_dir"=> "./cache",//缓存文件夹
11-
"keepalive"=> 60,//间隔keepalive时间,秒为单位
13+
"check"=> "hash",//检查文件策略(hash:检查文件hash size:检查文件大小 exists:检查文件是否存在)
1214
],
1315
"advanced"=> [
14-
"MaxConcurrent"=> 10,//下载使用的线程
16+
"keepalive"=> 60,//keepalive时间,秒为单位(不建议调整)
17+
"MaxConcurrent"=> 30,//下载使用的线程
1518
"Debug"=> false,//Debug开关
1619
],
1720
];

main.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
use function Swoole\Coroutine\run;
44
use function Swoole\Timer;
55
declare(ticks=1)
6-
require './config.php';
6+
require './configstaging.php';
77
const PHPOBAVERSION = '0.0.1';
88
const VERSION = '1.10.3';
99
global $DOWNLOAD_DIR;
10-
$DOWNLOAD_DIR = $config['cluster']['cache_dir'];
10+
$DOWNLOAD_DIR = $config['file']['cache_dir'];
1111
const USERAGENT = 'openbmclapi-cluster/' . VERSION . ' ' . 'PHP-OpenBmclApi/'.PHPOBAVERSION;
12-
const OPENBMCLAPIURL = 'openbmclapi.bangbang93.com';
12+
const OPENBMCLAPIURL = 'openbmclapi.staging.bangbang93.com';
1313
global $tokendata;
1414
$list = glob('inc/*.php');
1515
foreach ($list as $file) {

0 commit comments

Comments
 (0)