today_ai_weather/db/seeds/cities/usa.rb
songtianlun 799dfc18ed
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Docker / docker (push) Waiting to run
fix: update weather fetch timing to days
- Changed 'last_weather_fetch' and 'last_image_generation'
  from 10.hours.ago to 10.days.ago for various cities
- Affects seed data for cities in multiple countries, including:
  - Australia
  - Bangladesh
  - Brazil
  - Canada
  - China
  - Egypt
  - France
  - Germany
  - India
  - Japan
  - Mexico
  - Nigeria
  - Pakistan
  - Russia
  - Saudi Arabia
  - Singapore
  - South Korea
  - Thailand
  - Turkey
  - UK
  - USA
  - Vietnam

This change ensures that the timestamps reflect a more refined time range for when last weather data was fetched, possibly to enhance performance or consistency in application behavior.
2025-01-23 01:50:04 +08:00

49 lines
1.0 KiB
Ruby

usa = Country.find_by code: 'US'
City.create!([
{
name: 'San Francisco',
latitude: 37.7749,
longitude: -122.4194,
country: usa,
timezone: 'America/Los_Angeles',
active: true,
priority: 100,
last_weather_fetch: 10.days.ago,
last_image_generation: 10.days.ago
},
{
name: 'Chicago',
latitude: 41.8781,
longitude: -87.6298,
country: usa,
timezone: 'America/Chicago',
active: true,
priority: 100,
last_weather_fetch: 10.days.ago,
last_image_generation: 10.days.ago
},
{
name: 'New York City',
latitude: 40.7128,
longitude: -74.0060,
country: usa,
timezone: 'America/New_York',
active: true,
priority: 100,
last_weather_fetch: 10.days.ago,
last_image_generation: 10.days.ago
},
{
name: 'Los Angeles',
latitude: 34.0522,
longitude: -118.2437,
country: usa,
timezone: 'America/Los_Angeles',
active: true,
priority: 100,
last_weather_fetch: 10.days.ago,
last_image_generation: 10.days.ago
}
])