today_ai_weather/db/seeds/cities/australia.rb
songtianlun d728d7f50e feat: add batch weather art generation jobs
- Created BatchGenerateWeatherArtsJob to process eligible
  cities and generate weather art.
- Introduced GenerateWeatherArtJob for generating weather
  art and image attachment.
- Added AiService for obtaining prompts and generating
  images with OpenAI API.
- Implemented WeatherService to fetch current weather
  data from the QWeather API.
- Updated Gemfile with necessary gems (whenever,
  ruby-openai, httparty, down, aws-sdk-s3).

This commit introduces a system to create and store
weather art images for various cities based on current
weather conditions, leveraging external APIs for data
and image generation.
2025-01-22 16:50:00 +08:00

27 lines
565 B
Ruby

australia = Country.find_by code: 'AU'
City.create!([
{
name: 'Sydney',
latitude: -33.8688,
longitude: 151.2093,
country: australia,
timezone: 'Australia/Sydney',
active: false,
priority: 80,
last_weather_fetch: 10.hours.ago,
last_image_generation: 10.hours.ago
},
{
name: 'Melbourne',
latitude: -37.8136,
longitude: 144.9631,
country: australia,
timezone: 'Australia/Melbourne',
active: false,
priority: 75,
last_weather_fetch: 10.hours.ago,
last_image_generation: 10.hours.ago
}
])