mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 22:36:30 +03:00
Don't fetch from INBOX if it is disabled
Before, if there were more than 20 jobs at once, we unconditionally fetched from inbox
This commit is contained in:
@@ -69,9 +69,11 @@ async fn inbox_loop(ctx: Context, started: Sender<()>, inbox_handlers: ImapConne
|
|||||||
}
|
}
|
||||||
Some(job) => {
|
Some(job) => {
|
||||||
// Let the fetch run, but return back to the job afterwards.
|
// Let the fetch run, but return back to the job afterwards.
|
||||||
info!(ctx, "postponing imap-job {} to run fetch...", job);
|
|
||||||
jobs_loaded = 0;
|
jobs_loaded = 0;
|
||||||
fetch(&ctx, &mut connection).await;
|
if ctx.get_config_bool(Config::InboxWatch).await {
|
||||||
|
info!(ctx, "postponing imap-job {} to run fetch...", job);
|
||||||
|
fetch(&ctx, &mut connection).await;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
jobs_loaded = 0;
|
jobs_loaded = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user