Skip to main content

windmill_api/models/
get_queue_status_200_response_inner.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.809.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GetQueueStatus200ResponseInner {
16    #[serde(rename = "tag")]
17    pub tag: String,
18    /// jobs due for more than 3 seconds that no worker has picked up
19    #[serde(rename = "waiting")]
20    pub waiting: i32,
21    /// seconds the job the next pull would take has been waiting, absent when none is
22    #[serde(rename = "delay", skip_serializing_if = "Option::is_none")]
23    pub delay: Option<f64>,
24    #[serde(rename = "running")]
25    pub running: i32,
26    /// workers that pinged in the last minute and pull this tag
27    #[serde(rename = "workers")]
28    pub workers: i32,
29}
30
31impl GetQueueStatus200ResponseInner {
32    pub fn new(tag: String, waiting: i32, running: i32, workers: i32) -> GetQueueStatus200ResponseInner {
33        GetQueueStatus200ResponseInner {
34            tag,
35            waiting,
36            delay: None,
37            running,
38            workers,
39        }
40    }
41}
42