mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 00:01:55 +00:00
c93393d5c0
* handleError * revert * all
34 lines
920 B
Rust
34 lines
920 B
Rust
/*
|
|
* Author: Ruben Fiszel
|
|
* Copyright: Windmill Labs, Inc 2022
|
|
* This file and its contents are licensed under the AGPLv3 License.
|
|
* Please see the included NOTICE for copyright information and
|
|
* LICENSE-AGPL for a copy of the license.
|
|
*/
|
|
|
|
use chrono::DateTime;
|
|
use serde::{Deserialize, Serialize};
|
|
use sqlx::FromRow;
|
|
|
|
#[derive(FromRow, Serialize, Deserialize, Debug)]
|
|
pub struct Schedule {
|
|
pub workspace_id: String,
|
|
pub path: String,
|
|
pub edited_by: String,
|
|
pub edited_at: DateTime<chrono::Utc>,
|
|
pub schedule: String,
|
|
pub timezone: String,
|
|
pub enabled: bool,
|
|
pub script_path: String,
|
|
pub is_flow: bool,
|
|
pub args: Option<serde_json::Value>,
|
|
pub extra_perms: serde_json::Value,
|
|
pub email: String,
|
|
pub error: Option<String>,
|
|
pub on_failure: Option<String>,
|
|
}
|
|
|
|
pub fn schedule_to_user(path: &str) -> String {
|
|
format!("schedule-{}", path.replace('/', "-"))
|
|
}
|