From 0df808e97d8daaacf5afe0df3279ef4514734ea3 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 22 Mar 2020 15:02:32 -0500 Subject: [PATCH] Move timeout getter to JobInfo --- jobs-core/src/job_info.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jobs-core/src/job_info.rs b/jobs-core/src/job_info.rs index 8bf32d0..06c844a 100644 --- a/jobs-core/src/job_info.rs +++ b/jobs-core/src/job_info.rs @@ -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 {