added on disk cache for the timetables
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* update spring-boot 2.1.9 -> 2.1.10
This commit is contained in:
@ -41,7 +41,7 @@ class CachetAPIController {
|
||||
|
||||
fun postTotalRequests() {
|
||||
try {
|
||||
val url = URL("${StartupController.getCachetBaseURL()}/api/v1/metrics/1/points")
|
||||
val url = URL("${StartupController.cachetBaseURL}/api/v1/metrics/1/points")
|
||||
val jsonInputString = "{\"value\": ${getTotalRequests() -oldTotalRequests}, \"timestamp\": \"${(System.currentTimeMillis() / 1000)}\"}"
|
||||
oldTotalRequests = getTotalRequests()
|
||||
|
||||
@ -49,7 +49,7 @@ class CachetAPIController {
|
||||
con.requestMethod = "POST"
|
||||
con.setRequestProperty("Content-Type", "application/json; utf-8")
|
||||
con.setRequestProperty("Accept", "application/json")
|
||||
con.setRequestProperty("X-Cachet-Token", StartupController.getCachetAPIKey())
|
||||
con.setRequestProperty("X-Cachet-Token", StartupController.cachetAPIKey)
|
||||
con.doOutput = true
|
||||
|
||||
val os = con.outputStream
|
||||
|
Reference in New Issue
Block a user