1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-18 05:49:47 +00:00

feat: new background work process

This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
هذا الالتزام موجود في:
Adam Cooke
2024-02-14 13:46:04 +00:00
ملتزم من قبل Adam Cooke
الأصل 044058d0f1
التزام dc8e895bfe
69 ملفات معدلة مع 1675 إضافات و1186 حذوفات

عرض الملف

@@ -43,21 +43,10 @@ end
c = OpenSSL::SSL::SSLContext.new
c.verify_mode = OpenSSL::SSL::VERIFY_NONE
<<<<<<< Updated upstream
Net::SMTP.start("127.0.0.1", 2525) do |smtp|
smtp.send_message mail.to_s, mail.from.first, mail.to.first
end
=======
1000.times.map do
Thread.new do
smtp = Net::SMTP.new("77.72.7.155", 25)
# smtp.enable_starttls(c)
smtp.disable_starttls
smtp.start("localhost")
smtp.send_message mail.to_s, mail.from.first, mail.to.first
smtp.finish
end
end.each(&:join)
>>>>>>> Stashed changes
smtp = Net::SMTP.new("127.0.0.1", 2525)
smtp.enable_starttls(c)
smtp.start("localhost")
smtp.send_message mail.to_s, mail.from.first, mail.to.first
smtp.finish
puts "Sent"

4
script/smtp_server.rb Normal file
عرض الملف

@@ -0,0 +1,4 @@
# frozen_string_literal: true
require_relative "../config/environment"
Postal::SMTPServer::Server.new(debug: true).run

عرض الملف

@@ -2,4 +2,4 @@
# frozen_string_literal: true
require_relative "../config/environment"
Postal::Worker.new([:main]).work
Worker::Process.new.run