Move timeout getter to JobInfo

This commit is contained in:
asonix 2020-03-22 15:02:32 -05:00
parent 17416cd892
commit 0df808e97d

View file

@ -90,10 +90,6 @@ impl NewJobInfo {
&self.queue
}
pub fn timeout(&self) -> i64 {
self.timeout
}
/// Whether this job is ready to be run immediately
pub fn is_ready(&self) -> bool {
self.next_queue.is_none()
@ -183,6 +179,10 @@ impl JobInfo {
self.id
}
pub fn timeout(&self) -> i64 {
self.timeout
}
/// Convert a JobInfo into a ReturnJobInfo without executing it
pub fn unexecuted(self) -> ReturnJobInfo {
ReturnJobInfo {