مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-18 05:49:47 +00:00
use explicit autoloads rather than from paths
هذا الالتزام موجود في:
42
lib/postal.rb
Normal file
42
lib/postal.rb
Normal file
@@ -0,0 +1,42 @@
|
||||
module Postal
|
||||
|
||||
extend ActiveSupport::Autoload
|
||||
|
||||
eager_autoload do
|
||||
autoload :AppLogger
|
||||
autoload :BounceMessage
|
||||
autoload :Config
|
||||
autoload :Countries
|
||||
autoload :DKIMHeader
|
||||
autoload :Error
|
||||
autoload :FastServer
|
||||
autoload :Helpers
|
||||
autoload :HTTP
|
||||
autoload :HTTPSender
|
||||
autoload :Job
|
||||
autoload :LetsEncrypt
|
||||
autoload :MessageDB
|
||||
autoload :MessageInspection
|
||||
autoload :MessageParser
|
||||
autoload :MessageRequeuer
|
||||
autoload :QueryString
|
||||
autoload :RabbitMQ
|
||||
autoload :ReplySeparator
|
||||
autoload :RspecHelpers
|
||||
autoload :SendResult
|
||||
autoload :Sender
|
||||
autoload :SMTPServer
|
||||
autoload :SpamCheck
|
||||
autoload :UserCreator
|
||||
autoload :Version
|
||||
autoload :Worker
|
||||
end
|
||||
|
||||
def self.eager_load!
|
||||
super
|
||||
Postal::MessageDB.eager_load!
|
||||
Postal::FastServer.eager_load!
|
||||
Postal::SMTPServer.eager_load!
|
||||
end
|
||||
|
||||
end
|
||||
12
lib/postal/fast_server.rb
Normal file
12
lib/postal/fast_server.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module Postal
|
||||
module FastServer
|
||||
extend ActiveSupport::Autoload
|
||||
eager_autoload do
|
||||
autoload :Client
|
||||
autoload :HTTPHeader
|
||||
autoload :HTTPHeaderSet
|
||||
autoload :Interface
|
||||
autoload :Server
|
||||
end
|
||||
end
|
||||
end
|
||||
18
lib/postal/message_db.rb
Normal file
18
lib/postal/message_db.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
module Postal
|
||||
module MessageDB
|
||||
extend ActiveSupport::Autoload
|
||||
eager_autoload do
|
||||
autoload :Click
|
||||
autoload :Database
|
||||
autoload :Delivery
|
||||
autoload :LiveStats
|
||||
autoload :Load
|
||||
autoload :Message
|
||||
autoload :Migration
|
||||
autoload :Provisioner
|
||||
autoload :Statistics
|
||||
autoload :SuppressionList
|
||||
autoload :Webhooks
|
||||
end
|
||||
end
|
||||
end
|
||||
9
lib/postal/smtp_server.rb
Normal file
9
lib/postal/smtp_server.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module Postal
|
||||
module SMTPServer
|
||||
extend ActiveSupport::Autoload
|
||||
eager_autoload do
|
||||
autoload :Client
|
||||
autoload :Server
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,10 +1,5 @@
|
||||
namespace :postal do
|
||||
|
||||
desc "Start the backend job worker"
|
||||
task :worker => :environment do
|
||||
Postal::Worker.new([:main]).work
|
||||
end
|
||||
|
||||
desc "Start the cron worker"
|
||||
task :cron => :environment do
|
||||
require 'clockwork'
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم