mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
address @dignifiedquire Default suggestion
This commit is contained in:
@@ -125,7 +125,7 @@ pub const DC_CREATE_MVBOX: usize = 1;
|
|||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
#[derive(Debug, Display, Clone, Copy, PartialEq, Eq, FromPrimitive, ToPrimitive, ToSql, FromSql)]
|
#[derive(Debug, Display, Clone, Copy, PartialEq, Eq, FromPrimitive, ToPrimitive, ToSql, FromSql)]
|
||||||
pub enum Delay {
|
pub enum Delay {
|
||||||
DoNotTryAgain = 0,
|
Default = 0,
|
||||||
AtOnce = -1,
|
AtOnce = -1,
|
||||||
Standard = 3,
|
Standard = 3,
|
||||||
IncreationPoll = 2,
|
IncreationPoll = 2,
|
||||||
|
|||||||
@@ -754,7 +754,7 @@ fn job_perform(context: &Context, thread: Thread, probe_network: bool) {
|
|||||||
added_timestamp: row.get(4)?,
|
added_timestamp: row.get(4)?,
|
||||||
tries: row.get(6)?,
|
tries: row.get(6)?,
|
||||||
param: row.get::<_, String>(3)?.parse().unwrap_or_default(),
|
param: row.get::<_, String>(3)?.parse().unwrap_or_default(),
|
||||||
try_again: Delay::DoNotTryAgain,
|
try_again: Delay::Default,
|
||||||
pending_error: None,
|
pending_error: None,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -806,8 +806,8 @@ fn job_perform(context: &Context, thread: Thread, probe_network: bool) {
|
|||||||
|
|
||||||
let mut tries = 0;
|
let mut tries = 0;
|
||||||
while tries <= 1 {
|
while tries <= 1 {
|
||||||
// this can be modified by a job using dc_job_try_again_later()
|
// this can be modified by a job using try_again_later()
|
||||||
job.try_again = Delay::DoNotTryAgain;
|
job.try_again = Delay::Default;
|
||||||
|
|
||||||
match job.action {
|
match job.action {
|
||||||
Action::SendMsgToSmtp => job.do_DC_JOB_SEND(context),
|
Action::SendMsgToSmtp => job.do_DC_JOB_SEND(context),
|
||||||
|
|||||||
Reference in New Issue
Block a user