diff --git a/src/download.rs b/src/download.rs index 2fed19841..fd0efc9c3 100644 --- a/src/download.rs +++ b/src/download.rs @@ -85,7 +85,7 @@ impl MsgId { DownloadState::Available | DownloadState::Failure => { self.update_download_state(context, DownloadState::InProgress) .await?; - job::add(context, Job::new(Action::DownloadMsg, self.to_u32(), 0)).await?; + job::add(context, Job::new(Action::DownloadMsg, self.to_u32())).await?; } } Ok(()) diff --git a/src/job.rs b/src/job.rs index df808f458..4ba203823 100644 --- a/src/job.rs +++ b/src/job.rs @@ -85,14 +85,14 @@ impl fmt::Display for Job { } impl Job { - pub fn new(action: Action, foreign_id: u32, delay_seconds: i64) -> Self { + pub fn new(action: Action, foreign_id: u32) -> Self { let timestamp = time(); Self { job_id: 0, action, foreign_id, - desired_timestamp: timestamp + delay_seconds, + desired_timestamp: timestamp, added_timestamp: timestamp, tries: 0, } @@ -292,7 +292,7 @@ fn get_backoff_time_offset(tries: u32) -> i64 { pub(crate) async fn schedule_resync(context: &Context) -> Result<()> { kill_action(context, Action::ResyncFolders).await?; - add(context, Job::new(Action::ResyncFolders, 0, 0)).await?; + add(context, Job::new(Action::ResyncFolders, 0)).await?; Ok(()) }