diff --git a/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/MainTaskTrackerConfig.kt b/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/MainTaskTrackerConfig.kt index ad4fd10d..90e710bc 100644 --- a/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/MainTaskTrackerConfig.kt +++ b/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/MainTaskTrackerConfig.kt @@ -60,7 +60,7 @@ data class MainTaskTrackerConfig( val agreementFilePath = "$pluginFolderPath/agreement/agreement.json" val logFilesFolder = "$pluginFolderPath/logs" const val PLUGIN_PROPERTIES_FILE = "$PLUGIN_NAME.properties" - private const val DOMAIN = "http://0.0.0.0:8080" + private const val DOMAIN = "https://tt-server-5.labs.jb.gg" fun getRoute(path: String) = "$DOMAIN/$path" diff --git a/ij-server/src/main/kotlin/org/jetbrains/research/tasktracker/util/FileUtil.kt b/ij-server/src/main/kotlin/org/jetbrains/research/tasktracker/util/FileUtil.kt index 02185940..f2f884dd 100644 --- a/ij-server/src/main/kotlin/org/jetbrains/research/tasktracker/util/FileUtil.kt +++ b/ij-server/src/main/kotlin/org/jetbrains/research/tasktracker/util/FileUtil.kt @@ -3,7 +3,6 @@ package org.jetbrains.research.tasktracker.util import io.ktor.http.content.* import io.ktor.server.application.* import io.ktor.server.request.* -import io.ktor.server.util.* import io.ktor.util.pipeline.* import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.research.tasktracker.database.models.Research @@ -12,6 +11,8 @@ import java.nio.file.Path import java.nio.file.Paths import kotlin.io.path.createDirectories +private const val FILE_DIRECTORY = "/tmp/files/" + suspend inline fun PipelineContext.createLogFile( logFileType: String, researchId: Int @@ -36,7 +37,7 @@ fun createDirectoryPath(researchId: Int, subDirectory: String): Path { Research.findById(researchId)?.user?.id ?: error("There are no research with id `$researchId`") } - val directoryPath = Paths.get("files/$researchId/$userId/$subDirectory") + val directoryPath = Paths.get("$FILE_DIRECTORY$researchId/$userId/$subDirectory") directoryPath.createDirectories() return directoryPath }