fix: remove model elements that apparently don't get generated by DOMjudge sometimes

This commit is contained in:
Johannes Frohnmeyer 2024-05-12 17:11:48 +02:00
parent 378e3cc65c
commit 9bdf0026f0
Signed by: Johannes
GPG Key ID: E76429612C2929F4
3 changed files with 9 additions and 8 deletions

View File

@ -205,10 +205,10 @@ object SDom {
}.body()
println(response)
if (response.importError != null) {
resultFlow.emit(Result.failure(Exception(response.importError)))
return@launch
}
// if (response.importError != null) {
// resultFlow.emit(Result.failure(Exception(response.importError)))
// return@launch
// }
do {
val result: List<SDJudgement> = authenticatedClient.get(SDCredentials.url) {
url {
@ -224,6 +224,7 @@ object SDom {
}
} while (true)
} catch (e: Exception) {
logger.error("Failed to submit solution", e)
resultFlow.emit(Result.failure(e))
}
}

View File

@ -13,6 +13,6 @@ data class SDJudgement(
val id: String,
val valid: Boolean,
@SerialName("judgement_type_id") val judgementTypeId: String?,
@SerialName("judgehost") val judgeHost: String?,
// not needed @SerialName("judgehost") val judgeHost: String?,
@SerialName("max_run_time") val maxRunTime: Float?,
)

View File

@ -10,9 +10,9 @@ data class SDSubmission(
@SerialName("contest_time") val contestTime: String,
@SerialName("team_id") val teamId: String,
@SerialName("problem_id") val problemId: String,
val files: List<FileWithName>?,
//not needed val files: List<FileWithName>?,
val id: String,
@SerialName("external_id") val externalId: String?,
@SerialName("entry_point") val entryPoint: String?,
@SerialName("import_error") val importError: String?,
//not needed @SerialName("entry_point") val entryPoint: String?,
//not needed, I guess? @SerialName("import_error") val importError: String?,
)