feat: add background processing for weather art generation
- Include Sidekiq::Worker for asynchronous task execution - Implement condition to skip execution if weather data is up to date These changes enable efficient weather art generation by leveraging background processing, thereby improving overall application performance and responsiveness.
This commit is contained in:
parent
fd6292a81e
commit
c5101fb822
@ -1,4 +1,6 @@
|
|||||||
class GenerateWeatherArtWorker
|
class GenerateWeatherArtWorker
|
||||||
|
include Sidekiq::Worker
|
||||||
|
|
||||||
def perform(*args)
|
def perform(*args)
|
||||||
city = args[0]
|
city = args[0]
|
||||||
return if city.last_weather_fetch&.today?
|
return if city.last_weather_fetch&.today?
|
||||||
|
Loading…
Reference in New Issue
Block a user