Aggiunge fascia oraria, prova manuale obbligatoria e cruscotto invii email.
CI / lint (push) Failing after 16m2s
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled

Le campagne rispettano orario e giorni lavorativi, richiedono una mail di test con dati inseriti a mano prima dell'invio massivo e offrono una dashboard per monitorare l'avanzamento.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 00:04:33 +02:00
co-authored by Cursor
parent 4ddf534a0c
commit 98dcdbbf82
33 changed files with 882 additions and 56 deletions
+16
View File
@@ -0,0 +1,16 @@
# Riprende gli invii in fascia oraria dopo attese lunghe (notte/weekend)
# o dopo un riavvio del processo. L'adapter :async non persiste i job.
Rails.application.config.after_initialize do
next if Rails.env.test?
next unless defined?(Rails::Server) || ENV["MAILING_POLLER"] == "true"
Thread.new do
Rails.logger.info("[mailing-poller] avviato")
loop do
sleep 30
ResumeMailingsJob.perform_now
rescue StandardError => e
Rails.logger.error("[mailing-poller] #{e.class}: #{e.message}")
end
end
end
+3
View File
@@ -126,6 +126,9 @@ it:
ab_test: Test A/B
ab_assignment: Come assegnare A e B
interval_seconds: Pausa tra un invio e l'altro (secondi)
send_window_enabled: Invia solo in fascia oraria
send_window_start_tod: Dalle
send_window_end_tod: Alle
mail_identity: Account mittente
mail_template: Template A
mail_template_b: Template B
+4
View File
@@ -50,9 +50,13 @@ Rails.application.routes.draw do
resources :mail_templates, except: %i[show]
resources :mail_images, only: %i[create]
resources :mailings do
collection do
get :dashboard
end
member do
post :queue
post :test_send
get :test_preview
post :refresh_recipients
patch :update_recipients
get :preview