#[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 */
}job-service only.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
Sourcepub fn set_timeout<T>(self, v: T) -> Self
pub fn set_timeout<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_timeout<T>(self, v: Option<T>) -> 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.
§Example
let x = Scheduling::new().set_restart_job_on_worker_restart(true);Sourcepub fn set_strategy<T: Into<Strategy>>(self, v: T) -> Self
pub fn set_strategy<T: Into<Strategy>>(self, v: T) -> Self
Sourcepub fn set_disable_retries<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_retries<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_max_wait_duration<T>(self, v: T) -> Self
pub fn set_max_wait_duration<T>(self, v: T) -> Self
Sets the value of max_wait_duration.
§Example
use wkt::Duration;
let x = Scheduling::new().set_max_wait_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_max_wait_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_wait_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of max_wait_duration.
§Example
use wkt::Duration;
let x = Scheduling::new().set_or_clear_max_wait_duration(Some(Duration::default()/* use setters */));
let x = Scheduling::new().set_or_clear_max_wait_duration(None::<Duration>);Trait Implementations§
Source§impl Clone for Scheduling
impl Clone for Scheduling
Source§fn clone(&self) -> Scheduling
fn clone(&self) -> Scheduling
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Scheduling
impl Debug for Scheduling
Source§impl Default for Scheduling
impl Default for Scheduling
Source§fn default() -> Scheduling
fn default() -> Scheduling
Source§impl PartialEq for Scheduling
impl PartialEq for Scheduling
impl StructuralPartialEq for Scheduling
Auto Trait Implementations§
impl Freeze for Scheduling
impl RefUnwindSafe for Scheduling
impl Send for Scheduling
impl Sync for Scheduling
impl Unpin for Scheduling
impl UnsafeUnpin for Scheduling
impl UnwindSafe for Scheduling
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request