Skip to content
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

Fixes for attachment background processing #7854

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

gbp
Copy link
Member

@gbp gbp commented Aug 8, 2023

Relevant issue(s)

Changes after #7681

What does this do?

  1. Allow sidekiq.yml to be configurable
  2. Fix exceptions when masking attachments when attachment hexdigest are missing.

Why was this needed?

  1. To increase the number of workers
  2. To prevent failed jobs

Implementation notes

When calling parse_raw_email! (with hexdigest missing) it will result in brand new FoiAttachment instances with the old ones removed from the database. This means any user attempting the load the attachment might experience a temporary 404.

gbp added 2 commits August 8, 2023 12:18
As with other config files we may need to change the configuration here
for production environments.
When the hexdigest of an attachment has changed we can't retrieve the
original un-masked body of attachments. This is resulting in errors, to
fix this we can call `IncomingMessage#parse_raw_email!` to completely
rebuild the attachments (with new hexdigest) from scratch.
@gbp gbp merged commit a0f9595 into develop Aug 8, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant