diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-06 22:42:31 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-10 11:54:51 +0200 |
| commit | 5b8dfc78496452bd23fab59e3ead84a8941da779 (patch) | |
| tree | f45c9c7ccb367bcb291edf535fba0981b104933b /opendc-web/opendc-web-proto/src/main/kotlin/org/opendc | |
| parent | 5c05d729b83dfc367bf19e8559569030f6e400b3 (diff) | |
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.
Diffstat (limited to 'opendc-web/opendc-web-proto/src/main/kotlin/org/opendc')
| -rw-r--r-- | opendc-web/opendc-web-proto/src/main/kotlin/org/opendc/web/proto/runner/Job.kt | 7 |
1 files changed, 6 insertions, 1 deletions
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<String, Any>? = 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<String, Any>? = null) + public data class Update(val state: JobState, val runtime: Int, val results: Map<String, Any>? = null) } |
