mirror of
https://git.asonix.dog/asonix/background-jobs.git
synced 2024-11-28 06:50:59 +00:00
Move timeout getter to JobInfo
This commit is contained in:
parent
17416cd892
commit
0df808e97d
1 changed files with 4 additions and 4 deletions
|
@ -90,10 +90,6 @@ impl NewJobInfo {
|
||||||
&self.queue
|
&self.queue
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn timeout(&self) -> i64 {
|
|
||||||
self.timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Whether this job is ready to be run immediately
|
/// Whether this job is ready to be run immediately
|
||||||
pub fn is_ready(&self) -> bool {
|
pub fn is_ready(&self) -> bool {
|
||||||
self.next_queue.is_none()
|
self.next_queue.is_none()
|
||||||
|
@ -183,6 +179,10 @@ impl JobInfo {
|
||||||
self.id
|
self.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn timeout(&self) -> i64 {
|
||||||
|
self.timeout
|
||||||
|
}
|
||||||
|
|
||||||
/// Convert a JobInfo into a ReturnJobInfo without executing it
|
/// Convert a JobInfo into a ReturnJobInfo without executing it
|
||||||
pub fn unexecuted(self) -> ReturnJobInfo {
|
pub fn unexecuted(self) -> ReturnJobInfo {
|
||||||
ReturnJobInfo {
|
ReturnJobInfo {
|
||||||
|
|
Loading…
Reference in a new issue