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.
This commit is contained in:
songtianlun 2025-01-25 00:40:51 +08:00
parent ec3669249f
commit fe55437c96

View File

@ -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