diff --git a/server/src/main/kotlin/moe/lava/banksia/server/Application.kt b/server/src/main/kotlin/moe/lava/banksia/server/Application.kt index 5ec27af..ec5b77b 100644 --- a/server/src/main/kotlin/moe/lava/banksia/server/Application.kt +++ b/server/src/main/kotlin/moe/lava/banksia/server/Application.kt @@ -95,10 +95,6 @@ fun Application.module() { else call.respond(HttpStatusCode.NotFound) } - get("/debug.inc") { - gtfsr.debug = true - call.respondText("increment") - } get("/route_stops/{route_id}") { val routeId = call.parameters["route_id"]!! val useParent = call.queryParameters["parent"] in listOf("true", "1") diff --git a/server/src/main/kotlin/moe/lava/banksia/server/gtfsr/GtfsrService.kt b/server/src/main/kotlin/moe/lava/banksia/server/gtfsr/GtfsrService.kt index c3ac20b..5a0b1dc 100644 --- a/server/src/main/kotlin/moe/lava/banksia/server/gtfsr/GtfsrService.kt +++ b/server/src/main/kotlin/moe/lava/banksia/server/gtfsr/GtfsrService.kt @@ -51,7 +51,6 @@ class GtfsrService(private val client: HttpClient) { ) } - var debug = false suspend fun start() { if (started) { log("GtfsrService", "Tried to start when already started") @@ -96,10 +95,8 @@ class GtfsrService(private val client: HttpClient) { val time = Instant.ofEpochSecond(timestamp).atZone(ZoneId.systemDefault()) val base = File(BASE_DIR, type) -// val previousParent = File(base, "${time.year}-${((time.dayOfYear - 1) / 7).toString().padStart(2, '0')}") -// val currentParent = File(base, "${time.year}-${((time.dayOfYear - 1) / 7 + 1).toString().padStart(2, '0')}") - val previousParent = if (!debug) File(base, "2025-50") else File(base, "2025-51") - val currentParent = if (!debug) File(base, "2025-51") else File(base, "2025-52") + val previousParent = File(base, "${time.year}-${((time.dayOfYear - 1) / 7).toString().padStart(2, '0')}") + val currentParent = File(base, "${time.year}-${((time.dayOfYear - 1) / 7 + 1).toString().padStart(2, '0')}") val target = File(currentParent, "${timestamp}.proto") if (previousParent.isDirectory) {