|
@@ -70,7 +70,7 @@ class HttpServerSettelement
|
|
|
|
|
|
|
|
if ($worker_id == 0) {
|
|
if ($worker_id == 0) {
|
|
|
$obj = $this;
|
|
$obj = $this;
|
|
|
- Swoole\Timer::tick(5000, function ($id) use ($obj) {
|
|
|
|
|
|
|
+ Swoole\Timer::tick(500, function ($id) use ($obj) {
|
|
|
$obj->BatchSqlRedisToDB();
|
|
$obj->BatchSqlRedisToDB();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -356,7 +356,7 @@ class HttpServerSettelement
|
|
|
$redis->connect($redisconfig['host'], $redisconfig['port']);
|
|
$redis->connect($redisconfig['host'], $redisconfig['port']);
|
|
|
|
|
|
|
|
$batchsql = [];
|
|
$batchsql = [];
|
|
|
- $max = 5000;
|
|
|
|
|
|
|
+ $max = 1000;
|
|
|
|
|
|
|
|
for ($i = 0; $i < $max; $i++) {
|
|
for ($i = 0; $i < $max; $i++) {
|
|
|
$now = $redis->rpop(self::SQLKEY);
|
|
$now = $redis->rpop(self::SQLKEY);
|