mirror of
https://github.com/chatmail/core.git
synced 2026-05-24 17:26:30 +03:00
Remove always zero argument to Job::new()
This commit is contained in:
@@ -85,7 +85,7 @@ impl MsgId {
|
|||||||
DownloadState::Available | DownloadState::Failure => {
|
DownloadState::Available | DownloadState::Failure => {
|
||||||
self.update_download_state(context, DownloadState::InProgress)
|
self.update_download_state(context, DownloadState::InProgress)
|
||||||
.await?;
|
.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(())
|
Ok(())
|
||||||
|
|||||||
@@ -85,14 +85,14 @@ impl fmt::Display for Job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl 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();
|
let timestamp = time();
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
job_id: 0,
|
job_id: 0,
|
||||||
action,
|
action,
|
||||||
foreign_id,
|
foreign_id,
|
||||||
desired_timestamp: timestamp + delay_seconds,
|
desired_timestamp: timestamp,
|
||||||
added_timestamp: timestamp,
|
added_timestamp: timestamp,
|
||||||
tries: 0,
|
tries: 0,
|
||||||
}
|
}
|
||||||
@@ -292,7 +292,7 @@ fn get_backoff_time_offset(tries: u32) -> i64 {
|
|||||||
|
|
||||||
pub(crate) async fn schedule_resync(context: &Context) -> Result<()> {
|
pub(crate) async fn schedule_resync(context: &Context) -> Result<()> {
|
||||||
kill_action(context, Action::ResyncFolders).await?;
|
kill_action(context, Action::ResyncFolders).await?;
|
||||||
add(context, Job::new(Action::ResyncFolders, 0, 0)).await?;
|
add(context, Job::new(Action::ResyncFolders, 0)).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user