mirror of
https://github.com/chatmail/core.git
synced 2026-05-15 12:56:30 +03:00
Revert "More logging for "core spams imap events""
This reverts commit 5394327bf6.
This commit is contained in:
@@ -1505,8 +1505,7 @@ pub unsafe extern "C" fn dc_delete_msgs(
|
|||||||
let ctx = &*context;
|
let ctx = &*context;
|
||||||
let msg_ids = convert_and_prune_message_ids(msg_ids, msg_cnt);
|
let msg_ids = convert_and_prune_message_ids(msg_ids, msg_cnt);
|
||||||
|
|
||||||
block_on(message::delete_msgs(&ctx, &msg_ids));
|
block_on(message::delete_msgs(&ctx, &msg_ids))
|
||||||
info!(&ctx, "verbose (issue 2335): ffi called dc_delete_msgs()");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
0
scripts/set_core_version.py
Executable file → Normal file
0
scripts/set_core_version.py
Executable file → Normal file
@@ -258,12 +258,14 @@ pub(crate) async fn dc_receive_imf_inner(
|
|||||||
if !created_db_entries.is_empty() {
|
if !created_db_entries.is_empty() {
|
||||||
if needs_delete_job || delete_server_after == Some(0) {
|
if needs_delete_job || delete_server_after == Some(0) {
|
||||||
for db_entry in &created_db_entries {
|
for db_entry in &created_db_entries {
|
||||||
info!(context, "verbose (issue 2335): adding job after receive");
|
|
||||||
let mut params = Params::new();
|
|
||||||
params.set(Param::Arg, "comment: verbose (issue 2335) dc_receive_imf()");
|
|
||||||
job::add(
|
job::add(
|
||||||
context,
|
context,
|
||||||
job::Job::new(Action::DeleteMsgOnImap, db_entry.1.to_u32(), params, 0),
|
job::Job::new(
|
||||||
|
Action::DeleteMsgOnImap,
|
||||||
|
db_entry.1.to_u32(),
|
||||||
|
Params::new(),
|
||||||
|
0,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/job.rs
10
src/job.rs
@@ -635,7 +635,6 @@ impl Job {
|
|||||||
// Hidden messages are similar to trashed, but are
|
// Hidden messages are similar to trashed, but are
|
||||||
// related to some chat. We also delete their
|
// related to some chat. We also delete their
|
||||||
// database records.
|
// database records.
|
||||||
info!(context, "verbose (issue 2335): will delete from db");
|
|
||||||
job_try!(msg.id.delete_from_db(context).await)
|
job_try!(msg.id.delete_from_db(context).await)
|
||||||
} else {
|
} else {
|
||||||
// Remove server UID from the database record.
|
// Remove server UID from the database record.
|
||||||
@@ -646,7 +645,6 @@ impl Job {
|
|||||||
// we remove UID to reduce the number of messages
|
// we remove UID to reduce the number of messages
|
||||||
// pointing to the corresponding UID. Once the counter
|
// pointing to the corresponding UID. Once the counter
|
||||||
// reaches zero, we will remove the message.
|
// reaches zero, we will remove the message.
|
||||||
info!(context, "verbose (issue 2335): will unlink");
|
|
||||||
job_try!(msg.id.unlink(context).await);
|
job_try!(msg.id.unlink(context).await);
|
||||||
}
|
}
|
||||||
Status::Finished(Ok(()))
|
Status::Finished(Ok(()))
|
||||||
@@ -1032,7 +1030,6 @@ pub(crate) enum Connection<'a> {
|
|||||||
|
|
||||||
pub(crate) async fn load_imap_deletion_job(context: &Context) -> sql::Result<Option<Job>> {
|
pub(crate) async fn load_imap_deletion_job(context: &Context) -> sql::Result<Option<Job>> {
|
||||||
let res = if let Some(msg_id) = load_imap_deletion_msgid(context).await? {
|
let res = if let Some(msg_id) = load_imap_deletion_msgid(context).await? {
|
||||||
info!(context, "verbose (issue 2335): loading imap deletion job");
|
|
||||||
Some(Job::new(
|
Some(Job::new(
|
||||||
Action::DeleteMsgOnImap,
|
Action::DeleteMsgOnImap,
|
||||||
msg_id.to_u32(),
|
msg_id.to_u32(),
|
||||||
@@ -1142,7 +1139,7 @@ async fn perform_job_action(
|
|||||||
) -> Status {
|
) -> Status {
|
||||||
info!(
|
info!(
|
||||||
context,
|
context,
|
||||||
"{} begin immediate try {} of job {:?} - verbose (issue 2335)", &connection, tries, job
|
"{} begin immediate try {} of job {}", &connection, tries, job
|
||||||
);
|
);
|
||||||
|
|
||||||
let try_res = match job.action {
|
let try_res = match job.action {
|
||||||
@@ -1401,14 +1398,9 @@ LIMIT 1;
|
|||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.or(Some(job))
|
.or(Some(job))
|
||||||
} else {
|
} else {
|
||||||
info!(context, "verbose (issue 2335): executing job normally");
|
|
||||||
Some(job)
|
Some(job)
|
||||||
}
|
}
|
||||||
} else if let Some(job) = load_imap_deletion_job(context).await.unwrap_or_default() {
|
} else if let Some(job) = load_imap_deletion_job(context).await.unwrap_or_default() {
|
||||||
info!(
|
|
||||||
context,
|
|
||||||
"verbose (issue 2335): loaded imap deletion job (no others queued)"
|
|
||||||
);
|
|
||||||
Some(job)
|
Some(job)
|
||||||
} else {
|
} else {
|
||||||
load_housekeeping_job(context).await
|
load_housekeeping_job(context).await
|
||||||
|
|||||||
@@ -1438,12 +1438,9 @@ pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) {
|
|||||||
if let Err(err) = msg_id.trash(context).await {
|
if let Err(err) = msg_id.trash(context).await {
|
||||||
error!(context, "Unable to trash message {}: {}", msg_id, err);
|
error!(context, "Unable to trash message {}: {}", msg_id, err);
|
||||||
}
|
}
|
||||||
info!(context, "verbose delete_msgs()");
|
|
||||||
let mut params = Params::new();
|
|
||||||
params.set(Param::Arg, "comment: verbose (issue 2335) delete_msgs()");
|
|
||||||
job::add(
|
job::add(
|
||||||
context,
|
context,
|
||||||
job::Job::new(Action::DeleteMsgOnImap, msg_id.to_u32(), params, 0),
|
job::Job::new(Action::DeleteMsgOnImap, msg_id.to_u32(), Params::new(), 0),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user