fix(server/gtfsr): remove debug code
oops
This commit is contained in:
parent
a6584ec68c
commit
25e5282ea8
2 changed files with 2 additions and 9 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue