fix(server/gtfsr): remove debug code

oops
This commit is contained in:
Cilly Leang 2025-12-13 20:37:08 +11:00
parent a6584ec68c
commit 25e5282ea8
Signed by: cilly
GPG key ID: 6500251E087653C9
2 changed files with 2 additions and 9 deletions

View file

@ -95,10 +95,6 @@ fun Application.module() {
else else
call.respond(HttpStatusCode.NotFound) call.respond(HttpStatusCode.NotFound)
} }
get("/debug.inc") {
gtfsr.debug = true
call.respondText("increment")
}
get("/route_stops/{route_id}") { get("/route_stops/{route_id}") {
val routeId = call.parameters["route_id"]!! val routeId = call.parameters["route_id"]!!
val useParent = call.queryParameters["parent"] in listOf("true", "1") val useParent = call.queryParameters["parent"] in listOf("true", "1")

View file

@ -51,7 +51,6 @@ class GtfsrService(private val client: HttpClient) {
) )
} }
var debug = false
suspend fun start() { suspend fun start() {
if (started) { if (started) {
log("GtfsrService", "Tried to start when already 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 time = Instant.ofEpochSecond(timestamp).atZone(ZoneId.systemDefault())
val base = File(BASE_DIR, type) val base = File(BASE_DIR, type)
// val previousParent = File(base, "${time.year}-${((time.dayOfYear - 1) / 7).toString().padStart(2, '0')}") 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 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 target = File(currentParent, "${timestamp}.proto") val target = File(currentParent, "${timestamp}.proto")
if (previousParent.isDirectory) { if (previousParent.isDirectory) {