From 5b8dfc78496452bd23fab59e3ead84a8941da779 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 6 Oct 2022 22:42:31 +0200 Subject: feat(web/server): Add support for accounting simulation time This change updates the Quarkus-based web server to add support for tracking and limiting the simulation minutes used by the user in order to prevent misuse of shared resources. --- .../src/main/kotlin/org/opendc/web/proto/runner/Job.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'opendc-web/opendc-web-proto/src') diff --git a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt index dfaaa09e..4f21f0bb 100644 --- a/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt +++ b/opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt @@ -36,11 +36,16 @@ public data class Job( val state: JobState, val createdAt: Instant, val updatedAt: Instant, + val runtime: Int, val results: Map? = null ) { /** * A request to update the state of a job. + * + * @property state The next state of the job. + * @property runtime The runtime of the job (in seconds). + * @property results The results of the job. */ @Schema(name = "Runner.Job.Update") - public data class Update(val state: JobState, val results: Map? = null) + public data class Update(val state: JobState, val runtime: Int, val results: Map? = null) } -- cgit v1.2.3