Update mail.py to fetch mails in bulk

This speeds up the mail processing. See also https://github.com/paperless-ngx/paperless-ngx/discussions/5230
This commit is contained in:
Thomas Falkenberg 2024-01-04 22:00:11 +01:00 committed by GitHub
parent 8da2535a65
commit eacee78706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -569,6 +569,7 @@ class MailAccountHandler(LoggingMixin):
criteria=criterias, criteria=criterias,
mark_seen=False, mark_seen=False,
charset=rule.account.character_set, charset=rule.account.character_set,
bulk=True
) )
except Exception as err: except Exception as err:
raise MailError( raise MailError(