-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] rustify parts of job and imap handling, introduce Delay and ImapResult enums like in C #400
Conversation
…(with @r10s on the side)
…dd comments about missing dest_uid setting from imap
Ok(_) => {} | ||
Err(err) => { | ||
info!(context, 0, "Cannot copy message. {:?}", err); | ||
return ImapResult::Failed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should do a
return if !self.should_reconnect() {
ImapResult::Failed
} else {
ImapResult::RetryLater
};
here as well. otherwise, if network does away during copy, the message is never tried to copy again.
maybe it is also better to add the same check after mv-failing already - if it turnes out, network is away after move, trying over with copy+delete mayl raise the risk in a flaky network situation that one of these part fails.
- make dc_msg_exists safe
closing this PR but the branch remains in active development -- working with @r10s on larger scale changes on it: introducing perform_mvbox_jobs to make all jobs that do things with mvbox actually use the mvbox thread -- this way inbox thread does not have to select mvbox folder and then select back etc. -- it not only decreases network traffic but also decreases the dependency on interrupt_idle working in several situations. (right now, all imap jobs on all folders are running the perform_imap_jobs (to be renamed to perform_inbox_jobs at some point) action). This all came about because we couldn't do certain things because of hangings in the tests because we can't reliably interrupt idle, see jonhoo/rust-imap#132 |
removes "ok_to_continue" logic -- for reviewing lookings at non-cargo-fmt commits might be better. Or reviewing the end result of the changed functions and comparing them with C.