added on disk cache for the timetables
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:
2019-11-14 18:43:00 +01:00
parent dd064d63af
commit 697f5e3167
5 changed files with 89 additions and 64 deletions

View File

@ -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