windmill_api/models/queue_health.rs
1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.633.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// QueueHealth : Job queue status
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct QueueHealth {
17 /// Number of pending jobs in the queue
18 #[serde(rename = "pending_jobs")]
19 pub pending_jobs: i64,
20 /// Number of currently running jobs
21 #[serde(rename = "running_jobs")]
22 pub running_jobs: i64,
23}
24
25impl QueueHealth {
26 /// Job queue status
27 pub fn new(pending_jobs: i64, running_jobs: i64) -> QueueHealth {
28 QueueHealth {
29 pending_jobs,
30 running_jobs,
31 }
32 }
33}
34