Skip to content

Commit

Permalink
Remove job cancellation code which we believe is causing submissions …
Browse files Browse the repository at this point in the history
…to not be processed
  • Loading branch information
kristen-brown committed Mar 26, 2024
1 parent 0a3f02a commit 6f7ab1f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class UploadProcessor
sidekiq_options unique_for: 30.days

def perform(guid, caller_data, retries = 0)
return if cancelled?

response = nil
brt = Benchmark.realtime do
# @retries variable used via the CentralMail::Utilities which is included via VBADocuments::UploadValidations
Expand All @@ -46,20 +44,6 @@ def perform(guid, caller_data, retries = 0)
response&.success? ? true : false
end

def cancelled?
Sidekiq.redis do |c|
if c.respond_to? :exists?
c.exists?("cancelled-#{jid}")
else
c.exists("cancelled-#{jid}")
end
end
end

def self.cancel!(jid)
Sidekiq.redis { |c| c.setex("cancelled-#{jid}", 86_400, 1) }
end

private

# rubocop:disable Metrics/MethodLength
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
end

before do
allow_any_instance_of(described_class).to receive(:cancelled?).and_return(false)
allow_any_instance_of(Tempfile).to receive(:size).and_return(1) # must be > 0 or submission will error w/DOC107
objstore = instance_double(VBADocuments::ObjectStore)
version = instance_double(Aws::S3::ObjectVersion)
Expand Down

0 comments on commit 6f7ab1f

Please sign in to comment.