Skip to content

Commit

Permalink
Merge branch '8543-increase-regexp-timeout' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Jan 20, 2025
2 parents 556fb26 + c12dc6d commit d57b209
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/jobs/foi_attachment_mask_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class FoiAttachmentMaskJob < ApplicationJob
queue_as :default
unique :until_and_while_executing, on_conflict: :log

around_perform :set_regexp_timeout

attr_reader :attachment

delegate :incoming_message, to: :attachment
Expand Down Expand Up @@ -62,4 +64,11 @@ def masks
masks: info_request.masks
}
end

def set_regexp_timeout
current_timeout = Regexp.timeout
Regexp.timeout = 60.0
yield
Regexp.timeout = current_timeout
end
end
1 change: 1 addition & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Highlighted Features

Increase regular expression timeout for attachment masking (Graeme Porteous)
Add additional InfoRequest embargo scopes (Graeme Porteous)

# 0.45.3.0
Expand Down

0 comments on commit d57b209

Please sign in to comment.