[−][src]Trait izta::job::Job
Associated Types
type R: Serialize + DeserializeOwned
Result type produced by the run()
method.
Use ()
for jobs that are only executed for their side-effects.
type E: Serialize + DeserializeOwned
Error type produced by the run()
method.
Use ()
for jobs that always succeed.
Associated Constants
const UUID: &'static str
Each job must have a unique UUID. If any aspect of a job definition is changed, it's a good idea to update this.
const MAX_ATTEMPTS: usize
Maximum number of attempts (including first run) to execute job. Jobs that panic are never retried. Reruns are scheduled to occur at fail time + 5 seconds + attempts^4 seconds. Set to 1 if retry logic isn't desired.
Required methods
Loading content...Provided methods
fn run_task(&self, task: &Task) -> RunTaskResult
Execute associated Task
. Not meant to be re-implemented or called manually. The only caller
should be the process_jobs!
macro.