From 287ccb15ba8110e1bef3de888af9e3cce1049d8c Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 20 Aug 2019 10:40:27 +0200 Subject: [PATCH] address @dignifiedquire Default suggestion --- src/constants.rs | 2 +- src/job.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/constants.rs b/src/constants.rs index faec8e049..5c0ed53ae 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -125,7 +125,7 @@ pub const DC_CREATE_MVBOX: usize = 1; #[repr(i32)] #[derive(Debug, Display, Clone, Copy, PartialEq, Eq, FromPrimitive, ToPrimitive, ToSql, FromSql)] pub enum Delay { - DoNotTryAgain = 0, + Default = 0, AtOnce = -1, Standard = 3, IncreationPoll = 2, diff --git a/src/job.rs b/src/job.rs index a1ef28b9e..35072afaf 100644 --- a/src/job.rs +++ b/src/job.rs @@ -754,7 +754,7 @@ fn job_perform(context: &Context, thread: Thread, probe_network: bool) { added_timestamp: row.get(4)?, tries: row.get(6)?, param: row.get::<_, String>(3)?.parse().unwrap_or_default(), - try_again: Delay::DoNotTryAgain, + try_again: Delay::Default, pending_error: None, }; @@ -806,8 +806,8 @@ fn job_perform(context: &Context, thread: Thread, probe_network: bool) { let mut tries = 0; while tries <= 1 { - // this can be modified by a job using dc_job_try_again_later() - job.try_again = Delay::DoNotTryAgain; + // this can be modified by a job using try_again_later() + job.try_again = Delay::Default; match job.action { Action::SendMsgToSmtp => job.do_DC_JOB_SEND(context),