From fe55437c96438139c84022957fb161f07e2e8eb6 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Sat, 25 Jan 2025 00:40:51 +0800 Subject: [PATCH] refactor: update generation and sleep intervals - Change generation interval from 6 hours to 24 hours - Increase sleep duration from 3 seconds to 60 seconds These adjustments aim to optimize the worker's performance and reduce resource consumption. This change reflects a shift towards longer generation cycles, potentially improving throughput. --- app/workers/batch_generate_weather_arts_worker.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/workers/batch_generate_weather_arts_worker.rb b/app/workers/batch_generate_weather_arts_worker.rb index 85062bf..4712717 100644 --- a/app/workers/batch_generate_weather_arts_worker.rb +++ b/app/workers/batch_generate_weather_arts_worker.rb @@ -1,9 +1,9 @@ class BatchGenerateWeatherArtsWorker include Sidekiq::Worker - GENERATION_INTERVAL = 6.hours + GENERATION_INTERVAL = 24.hours MAX_DURATION = 50.minutes - SLEEP_DURATION = 3.seconds + SLEEP_DURATION = 60.seconds def perform(*args) start_time = Time.current