Merge pull request #5936 from betagouv/fix-zeitwerk-smtp-warning
Correction de messages d'avertissement liés à Zeitwerk (#5936)
This commit is contained in:
commit
8b5a012e14
3 changed files with 26 additions and 16 deletions
|
@ -1,3 +1,9 @@
|
|||
# Note: this class is instanciated when being added as an interceptor
|
||||
# during the app initialization.
|
||||
#
|
||||
# If you edit this file in development env, you will need to restart
|
||||
# the app to see the changes.
|
||||
|
||||
class DynamicSmtpSettingsInterceptor
|
||||
def self.delivering_email(message)
|
||||
if ENV['SENDINBLUE_BALANCING'] == 'enabled'
|
||||
|
|
|
@ -11,22 +11,24 @@
|
|||
# - but let's keep these for a while to make external integrators's life easier.
|
||||
# To keep some margin, let's say this file can be safely deleted in May 2021.)
|
||||
|
||||
require 'excon'
|
||||
|
||||
Rails.application.reloader.to_prepare do
|
||||
module ApiEntreprise
|
||||
Job = APIEntreprise::Job
|
||||
AssociationJob = APIEntreprise::AssociationJob
|
||||
AttestationFiscaleJob = APIEntreprise::AttestationFiscaleJob
|
||||
AttestationSocialeJob = APIEntreprise::AttestationSocialeJob
|
||||
BilansBdfJob = APIEntreprise::BilansBdfJob
|
||||
EffectifsAnnuelsJob = APIEntreprise::EffectifsAnnuelsJob
|
||||
EffectifsJob = APIEntreprise::EffectifsJob
|
||||
EntrepriseJob = APIEntreprise::EntrepriseJob
|
||||
ExercicesJob = APIEntreprise::ExercicesJob
|
||||
end
|
||||
if !defined?(ApiEntreprise)
|
||||
require 'excon'
|
||||
|
||||
module Cron
|
||||
FixMissingAntivirusAnalysis = FixMissingAntivirusAnalysisJob
|
||||
module ApiEntreprise
|
||||
Job = APIEntreprise::Job
|
||||
AssociationJob = APIEntreprise::AssociationJob
|
||||
AttestationFiscaleJob = APIEntreprise::AttestationFiscaleJob
|
||||
AttestationSocialeJob = APIEntreprise::AttestationSocialeJob
|
||||
BilansBdfJob = APIEntreprise::BilansBdfJob
|
||||
EffectifsAnnuelsJob = APIEntreprise::EffectifsAnnuelsJob
|
||||
EffectifsJob = APIEntreprise::EffectifsJob
|
||||
EntrepriseJob = APIEntreprise::EntrepriseJob
|
||||
ExercicesJob = APIEntreprise::ExercicesJob
|
||||
end
|
||||
|
||||
module Cron
|
||||
FixMissingAntivirusAnalysis = FixMissingAntivirusAnalysisJob
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
ActionMailer::Base.register_interceptor "DynamicSmtpSettingsInterceptor"
|
||||
ActiveSupport.on_load(:action_mailer) do
|
||||
ActionMailer::Base.register_interceptor "DynamicSmtpSettingsInterceptor"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue