mirror of
https://git.asonix.dog/asonix/background-jobs.git
synced 2024-11-24 13:01:00 +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
|
||||
}
|
||||
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue