pub struct RunningJob {
pub job: Job,
pub started: Duration,
pub node: String,
pub pid: u32,
pub completed: Duration,
pub exit_code: Option<i32>,
}Fields§
§job: Job§started: Duration§node: String§pid: u32§completed: Duration§exit_code: Option<i32>Implementations§
Source§impl RunningJob
impl RunningJob
pub fn duration(&self) -> Duration
pub fn wait_duration(&self) -> Duration
pub fn cancel(&self) -> Result<()>
pub fn zombie(&self) -> Result<()>
pub fn kill(&self) -> Result<()>
Sourcepub fn exists(&self) -> bool
pub fn exists(&self) -> bool
Check if this job exists on this host. This checks if a process with the right pid has the right command line. It is not perfect, but it beats just randomly killing a process with the same id if something went wrong.
Sourcepub fn memory_in_use(&self) -> u64
pub fn memory_in_use(&self) -> u64
Memory used by this job, returning 0 if unavailable.
Trait Implementations§
Source§impl Clone for RunningJob
impl Clone for RunningJob
Source§fn clone(&self) -> RunningJob
fn clone(&self) -> RunningJob
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RunningJob
impl Debug for RunningJob
Source§impl<'de> Deserialize<'de> for RunningJob
impl<'de> Deserialize<'de> for RunningJob
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for RunningJob
impl Hash for RunningJob
Source§impl Ord for RunningJob
impl Ord for RunningJob
Source§fn cmp(&self, other: &RunningJob) -> Ordering
fn cmp(&self, other: &RunningJob) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RunningJob
impl PartialEq for RunningJob
Source§impl PartialOrd for RunningJob
impl PartialOrd for RunningJob
Source§impl Serialize for RunningJob
impl Serialize for RunningJob
impl Eq for RunningJob
impl StructuralPartialEq for RunningJob
Auto Trait Implementations§
impl Freeze for RunningJob
impl RefUnwindSafe for RunningJob
impl Send for RunningJob
impl Sync for RunningJob
impl Unpin for RunningJob
impl UnwindSafe for RunningJob
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
Mutably borrows from an owned value. Read more