songtianlun
f7c5ae4ee7
- Modified the schedule_tasks.rb initializer to only run RefreshSitemapWorker.perform_async unless RAILS_BUILD environment variable is set This change optimizes the build process by preventing unnecessary sitemap refreshes during build time, thus improving overall project performance.
5 lines
152 B
Ruby
5 lines
152 B
Ruby
# config/initializers/schedule_tasks.rb
|
|
Rails.application.config.after_initialize do
|
|
RefreshSitemapWorker.perform_async unless ENV["RAILS_BUILD"]
|
|
end
|