Skip to content

Commit

Permalink
Merge pull request #1563 from alphagov/dependabot/bundler/govuk_sidek…
Browse files Browse the repository at this point in the history
…iq-9.0.1

Bump govuk_sidekiq from 8.0.1 to 9.0.1
  • Loading branch information
AgaDufrat authored Oct 18, 2024
2 parents ed47725 + a690c1a commit e1a4422
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,11 @@ GEM
rouge
sprockets (>= 3)
sprockets-rails
govuk_sidekiq (8.0.1)
govuk_sidekiq (9.0.1)
gds-api-adapters (>= 19.1.0)
govuk_app_config (>= 1.1)
redis (< 5)
redis-namespace (~> 1.6)
sidekiq (~> 6.5, >= 6.5.12)
redis-client (>= 0.22.2)
sidekiq (~> 7.0, < 8)
govuk_test (4.1.0)
brakeman (>= 5.0.2)
capybara (>= 3.36)
Expand Down Expand Up @@ -575,9 +574,8 @@ GEM
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
redis (4.8.1)
redis-namespace (1.11.0)
redis (>= 4)
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.2)
reline (0.5.10)
io-console (~> 0.5)
Expand Down Expand Up @@ -664,10 +662,12 @@ GEM
sentry-sidekiq (5.21.0)
sentry-ruby (~> 5.21.0)
sidekiq (>= 3.0)
sidekiq (6.5.12)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
sidekiq (7.3.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
logger
rack (>= 2.2.4)
redis-client (>= 0.22.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/content_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def export_csv
@recipient = current_user.email

start_time_string = Time.zone.now.to_s
CsvExportWorker.perform_async(search_params.stringify_keys, @recipient, start_time_string)
CsvExportJob.perform_async(search_params.stringify_keys, @recipient, start_time_string)
end

private
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require "prometheus/client"
require "prometheus/client/push"

class CsvExportWorker
class CsvExportJob
include FileStorage
include Sidekiq::Worker
include Sidekiq::Job

sidekiq_options retry: 0
sidekiq_options queue: "export_csv"
Expand Down Expand Up @@ -61,3 +61,5 @@ def push_metrics_to_pushgateway(elapsed_time_seconds)
).add(prometheus_registry)
end
end

CsvExportWorker = CsvExportJob ## TODO: Remove once queued jobs at the time of the upgrade are complete
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "govuk_sidekiq/testing"

RSpec.describe CsvExportWorker do
RSpec.describe CsvExportJob do
let(:search_params) do
{
date_range: "past-30-days",
Expand Down Expand Up @@ -68,7 +68,7 @@
let(:csv_export_histogram) { instance_spy(Prometheus::Client::Histogram) }

before do
Sidekiq::Worker.clear_all
Sidekiq::Job.clear_all

ENV["AWS_CSV_EXPORT_BUCKET_NAME"] = "test-bucket"
ENV["PROMETHEUS_PUSHGATEWAY_URL"] = "http://prometheus-pushgateway.local"
Expand Down

0 comments on commit e1a4422

Please sign in to comment.