Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Nov 26, 2024
1 parent 46ae840 commit 125ad85
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions clock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require './config/boot'
require './config/environment'

# TODO(solid_queue): Remove file
module Clockwork
handler do |job, time|
puts "Running #{job} at #{time}"
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

# TODO(solid_queue): Remove

require 'socket'

LIVENESS_PORT = 8080
Expand Down
7 changes: 5 additions & 2 deletions config/queue_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ default: &default
batch_size: 500
workers:
- queues: "events"
threads: 3
processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>
threads: <%= ENV.fetch("JOB_CONCURRENCY", 10) %>
processes: 1
polling_interval: 0.1

development:
Expand All @@ -14,5 +14,8 @@ development:
test:
<<: *default

staging:
<<: *default

production:
<<: *default
7 changes: 5 additions & 2 deletions config/queue_pdfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ default: &default
batch_size: 500
workers:
- queues: "pdfs"
threads: 3
processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>
threads: <%= ENV.fetch("JOB_CONCURRENCY", 10) %>
processes: 1
polling_interval: 3

development:
Expand All @@ -14,5 +14,8 @@ development:
test:
<<: *default

staging:
<<: *default

production:
<<: *default
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
if ENV['LAGO_JOB_DASHBOARD'] == 'true'
mount MissionControl::Jobs::Engine, at: "/jobs"
end
# TODO(solid_queue): Remove
mount Sidekiq::Web, at: '/sidekiq' if defined? Sidekiq::Web

mount Karafka::Web::App, at: '/karafka' if ENV['KARAFKA_WEB']
mount GraphiQL::Rails::Engine, at: '/graphiql', graphql_path: '/graphql' if Rails.env.development?
Expand Down
1 change: 1 addition & 0 deletions config/sidekiq.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO(solid_queue): Remove
concurrency: 10
timeout: 25
retry: 1
Expand Down
1 change: 1 addition & 0 deletions config/sidekiq_events.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO(solid_queue): Remove
concurrency: 10
timeout: 25
retry: 1
Expand Down
1 change: 1 addition & 0 deletions config/sidekiq_pdfs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO(solid_queue): Remove
concurrency: 10
timeout: 25
retry: 1
Expand Down
1 change: 1 addition & 0 deletions scripts/start.clock.dev.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

# TODO(solid_queue): Remove
bundle install
bundle exec clockwork ./clock.rb
3 changes: 2 additions & 1 deletion scripts/start.clock.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

bundle exec clockwork ./clock.rb
# TODO(solid_queue): Remove
bundle exec clockwork ./clock.rb
1 change: 1 addition & 0 deletions spec/clockwork_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'rails_helper'

# TODO(solid_queue): Remove
describe Clockwork do
after { Clockwork::Test.clear! }

Expand Down

0 comments on commit 125ad85

Please sign in to comment.