diff --git a/CHANGELOG.md b/CHANGELOG.md index 119848e5..67fb87fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +# 0.21.3 - 2025-01-04 + +### Added + +- A notification about Photon API being under heavy load. + +### Removed + +- The notification about telemetry being enabled. + +### Reverted + +- ~~Imported points will now be reverse geocoded only after import is finished.~~ + # 0.21.2 - 2024-12-25 ### Added diff --git a/db/data/20241206163450_create_telemetry_notification.rb b/db/data/20241206163450_create_telemetry_notification.rb index bd5f6dd2..2d9f93d4 100644 --- a/db/data/20241206163450_create_telemetry_notification.rb +++ b/db/data/20241206163450_create_telemetry_notification.rb @@ -2,11 +2,12 @@ class CreateTelemetryNotification < ActiveRecord::Migration[7.2] def up - User.find_each do |user| - Notifications::Create.new( - user:, kind: :info, title: 'Telemetry enabled', content: notification_content - ).call - end + # TODO: Remove + # User.find_each do |user| + # Notifications::Create.new( + # user:, kind: :info, title: 'Telemetry enabled', content: notification_content + # ).call + # end end def down diff --git a/db/data/20250104204852_create_photon_load_notification.rb b/db/data/20250104204852_create_photon_load_notification.rb new file mode 100644 index 00000000..0b8009fe --- /dev/null +++ b/db/data/20250104204852_create_photon_load_notification.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +class CreatePhotonLoadNotification < ActiveRecord::Migration[8.0] + def up + User.find_each do |user| + Notifications::Create.new( + user:, kind: :info, title: '⚠️ Photon API is under heavy load', content: notification_content + ).call + end + end + + def down + raise ActiveRecord::IrreversibleMigration + end + + private + + def notification_content + <<~CONTENT +
+ A few days ago @lonvia, maintainer of https://photon.komoot.io, the reverse-geocoding API service that Dawarich is using by default, reached me to highlight a problem: Dawarich makes too many requests to https://photon.komoot.io, even with recently introduced rate-limiting to prevent more than 1 request per second. +
+ +
+ Photon is a great service and Dawarich wouldn't be what it is now without it, but I have to ask all Dawarich users that are running it on their hardware to either switch to a Photon instance hosted by me (Freika) or strongly consider hosting their own Photon instance. Thanks to @rtuszik, it's pretty much docker compose up -d. The documentation on the website will be soon updated to also encourage setting up your own Photon instance. More reverse geocoding options will be added in the future.
Let's decrease load on https://photon.komoot.io together!
+ +Thank you.
+ CONTENT + end +end diff --git a/db/data_schema.rb b/db/data_schema.rb index e14cf9d4..222b8d11 100644 --- a/db/data_schema.rb +++ b/db/data_schema.rb @@ -1 +1 @@ -DataMigrate::Data.define(version: 20241107112451) +DataMigrate::Data.define(version: 20250104204852) diff --git a/db/schema.rb b/db/schema.rb index a79c53a9..16db4226 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,9 +10,9 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2024_12_11_113119) do +ActiveRecord::Schema[8.0].define(version: 2024_12_11_113119) do # These are extensions that must be enabled in order to support this database - enable_extension "plpgsql" + enable_extension "pg_catalog.plpgsql" create_table "action_text_rich_texts", force: :cascade do |t| t.string "name", null: false