#[non_exhaustive]pub struct Scheduling {
pub timeout: Option<Duration>,
pub restart_job_on_worker_restart: bool,
pub strategy: Strategy,
pub disable_retries: bool,
pub max_wait_duration: Option<Duration>,
/* private fields */
}Expand description
All parameters related to queuing and scheduling of custom jobs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timeout: Option<Duration>Optional. The maximum job running time. The default is 7 days.
restart_job_on_worker_restart: boolOptional. Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.
strategy: StrategyOptional. This determines which type of scheduling strategy to use.
disable_retries: boolOptional. Indicates if the job should retry for internal errors after the
job starts running. If true, overrides
Scheduling.restart_job_on_worker_restart to false.
max_wait_duration: Option<Duration>Optional. This is the maximum duration that a job will wait for the requested resources to be provisioned if the scheduling strategy is set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait indefinitely. The default is 24 hours.
Implementations§
Source§impl Scheduling
impl Scheduling
pub fn new() -> Self
Sourcepub fn set_restart_job_on_worker_restart<T: Into<bool>>(self, v: T) -> Self
pub fn set_restart_job_on_worker_restart<T: Into<bool>>(self, v: T) -> Self
Sets the value of restart_job_on_worker_restart.
Sourcepub fn set_strategy<T: Into<Strategy>>(self, v: T) -> Self
pub fn set_strategy<T: Into<Strategy>>(self, v: T) -> Self
Sets the value of strategy.
Sourcepub fn set_disable_retries<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_retries<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_retries.
Sourcepub fn set_max_wait_duration<T: Into<Option<Duration>>>(self, v: T) -> Self
pub fn set_max_wait_duration<T: Into<Option<Duration>>>(self, v: T) -> Self
Sets the value of max_wait_duration.
Trait Implementations§
Source§impl Clone for Scheduling
impl Clone for Scheduling
Source§fn clone(&self) -> Scheduling
fn clone(&self) -> Scheduling
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more