|
|
@ -22,7 +22,7 @@ import java.util.HashSet; |
|
|
* контролллер для проверки жива ли эта хуйня и че там по бд |
|
|
* контролллер для проверки жива ли эта хуйня и че там по бд |
|
|
*/ |
|
|
*/ |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("/api/pulse") |
|
|
@RequestMapping("/api") |
|
|
public class PulseController { |
|
|
public class PulseController { |
|
|
|
|
|
|
|
|
DBService dbService; |
|
|
DBService dbService; |
|
|
@ -41,7 +41,7 @@ public class PulseController { |
|
|
this.waitAfterNextAspect = waitAfterNextAspect; |
|
|
this.waitAfterNextAspect = waitAfterNextAspect; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping(value = {"/db", "/"}) |
|
|
@GetMapping(value = {"/pulse/db", "/pulse"}) |
|
|
public ResponseEntity<Long> getDBPulse() { |
|
|
public ResponseEntity<Long> getDBPulse() { |
|
|
return new ResponseEntity(dbService.getDBServerTime(), HttpStatus.OK); |
|
|
return new ResponseEntity(dbService.getDBServerTime(), HttpStatus.OK); |
|
|
} |
|
|
} |
|
|
@ -50,17 +50,17 @@ public class PulseController { |
|
|
* ЕСЛИ 0 ЗНАЧИТ ЗАЕБИСЬ |
|
|
* ЕСЛИ 0 ЗНАЧИТ ЗАЕБИСЬ |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/db/diff") |
|
|
@GetMapping("/pulse/db/diff") |
|
|
public ResponseEntity<Long> getDiff() { |
|
|
public ResponseEntity<Long> getDiff() { |
|
|
return new ResponseEntity<>(onlineUpdater.getDifferentReplica(), HttpStatus.OK); |
|
|
return new ResponseEntity<>(onlineUpdater.getDifferentReplica(), HttpStatus.OK); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/services") |
|
|
@GetMapping("/pulse/services") |
|
|
public ResponseEntity<HashMap<String, Long>> getServices() { |
|
|
public ResponseEntity<HashMap<String, Long>> getServices() { |
|
|
return new ResponseEntity<>(statsService.getServices(), HttpStatus.OK); |
|
|
return new ResponseEntity<>(statsService.getServices(), HttpStatus.OK); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/ratelimit") |
|
|
@GetMapping("/pulse/ratelimit") |
|
|
@WaitAfterNext(order = "ratelimitcheck") |
|
|
@WaitAfterNext(order = "ratelimitcheck") |
|
|
@CheckWebAccess |
|
|
@CheckWebAccess |
|
|
@CheckPermitionFlag(flag = "z") |
|
|
@CheckPermitionFlag(flag = "z") |
|
|
|