Merge pull request #563 from huangyunbin/limiter
#562 Limiter DEFAULT_LIMIT optimization
This commit is contained in:
commit
33e5e47832
@ -40,9 +40,9 @@ It is super easy to get started with your first project.
|
||||
|
||||
You can download the package from the [latest stable release](https://github.com/alibaba/nacos/releases).
|
||||
|
||||
Take release nacos-server-0.6.1.zip for example.
|
||||
Take release nacos-server-0.7.0.zip for example.
|
||||
```
|
||||
unzip nacos-server-0.6.1.zip
|
||||
unzip nacos-server-0.7.0.zip
|
||||
cd nacos/bin
|
||||
```
|
||||
|
||||
|
@ -42,13 +42,12 @@ public class Limiter {
|
||||
/**
|
||||
* qps 5
|
||||
*/
|
||||
private static final String DEFAULT_LIMIT = "5";
|
||||
private static double limit = 5;
|
||||
|
||||
static {
|
||||
try {
|
||||
String limitTimeStr = System
|
||||
.getProperty("limitTime", DEFAULT_LIMIT);
|
||||
.getProperty("limitTime", String.valueOf(limit));
|
||||
limit = Double.parseDouble(limitTimeStr);
|
||||
log.info("limitTime:{}", limit);
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user