chore: update gem dependencies and formatting

- Standardized quotation marks in Gemfile and Ruby files
- Improved consistency for Sidekiq and Sidekiq Scheduler
- Removed unnecessary blank line in GenerateWeatherArtWorker class

These changes ensure a consistent coding style across the project, making
it easier to read and maintain. Adjustments to the Gemfile update the
formatting without altering the functionality.
This commit is contained in:
songtianlun 2025-01-22 17:58:46 +08:00
parent 2bcfea30ee
commit 78722caeb9
4 changed files with 8 additions and 9 deletions

View File

@ -50,8 +50,8 @@ gem "ruby-openai", "~> 7.3"
gem "httparty", "~> 0.22.0"
gem "down", "~> 5.4"
gem "aws-sdk-s3", "~> 1.177"
gem 'sidekiq', '~> 7.3'
gem 'sidekiq-scheduler', '~> 5.0'
gem "sidekiq", "~> 7.3"
gem "sidekiq-scheduler", "~> 5.0"
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem

View File

@ -1,5 +1,4 @@
class GenerateWeatherArtWorker
def perform(*args)
city = args[0]
return if city.last_weather_fetch&.today?

View File

@ -1,9 +1,9 @@
require 'sidekiq'
require 'sidekiq-scheduler'
require "sidekiq"
require "sidekiq-scheduler"
Sidekiq.configure_server do |config|
config.on(:startup) do
Sidekiq.schedule = YAML.load_file(File.expand_path('../../sidekiq.yml', __FILE__))
Sidekiq.schedule = YAML.load_file(File.expand_path("../../sidekiq.yml", __FILE__))
Sidekiq::Scheduler.reload_schedule!
end
end
end

View File

@ -1,4 +1,4 @@
require 'sidekiq/web'
require "sidekiq/web"
Rails.application.routes.draw do
root "home#index"
@ -22,7 +22,7 @@ Rails.application.routes.draw do
# mount Sidekiq::Web => '/sidekiq'
authenticate :admin_user do
mount Sidekiq::Web => '/sidekiq'
mount Sidekiq::Web => "/sidekiq"
end
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html