[openstreetmap/openstreetmap-website] Use Noticed for notifications on GPX imports (PR #6939)

Tom Hughes notifications at github.com
Wed Mar 25 17:29:47 UTC 2026


@tomhughes commented on this pull request.



> @@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class GpxImportSuccessNotifier < ApplicationNotifier
+  recipients -> { record.user }

This is controlling what user the notification is linked to, but it doesn't actually effect where the email goes because the `gpx_success` mailer determines the recipient itself. Is that going to be confusing?

> @@ -14,7 +14,9 @@ def gpx.actual_points
     end
 
     trace.stub(:import, gpx) do
-      TraceImporterJob.perform_now(trace)
+      perform_enqueued_jobs do

This needed because the `perform_now` only runs the trace import job and we need to then run the event job before the mail is submitted now?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6939?email_source=notifications&email_token=AAK2OLNYWOBTSEI2XEN4DY34SQJQXA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBQHA2DONZSGE32M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS6XA4S7OJSXM2LFO5PW433UNFTGSY3BORUW63TTL5RWY2LDNM#pullrequestreview-4008477217
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6939/review/4008477217 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260325/67695bfe/attachment.htm>


More information about the rails-dev mailing list