1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +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 حذوفات

عرض الملف

@@ -1,30 +0,0 @@
# frozen_string_literal: true
module Clockwork
configure do |config|
config[:tz] = "UTC"
config[:logger] = Postal.logger
end
every 1.minute, "every-1-minutes" do
RequeueWebhooksJob.queue(:main)
SendNotificationsJob.queue(:main)
end
every 1.hour, "every-hour", at: ["**:15"] do
CheckAllDNSJob.queue(:main)
ExpireHeldMessagesJob.queue(:main)
CleanupAuthieSessionsJob.queue(:main)
end
every 1.hour, "every-hour", at: ["**:45"] do
PruneWebhookRequestsJob.queue(:main)
end
every 1.day, "every-day", at: ["03:00"] do
ProcessMessageRetentionJob.queue(:main)
PruneSuppressionListsJob.queue(:main)
end
end

عرض الملف

@@ -1,3 +1,5 @@
# frozen_string_literal: true
begin
def add_exception_to_payload(payload, event)
return unless exception = event.payload[:exception_object]

عرض الملف

@@ -40,16 +40,6 @@ message_db:
password: <%= ENV.fetch('MESSAGE_DB_PASSWORD', '') %>
prefix: <%= ENV.fetch('MESSAGE_DB_PREFIX', 'postal') %>
rabbitmq:
host: <%= ENV.fetch('RABBITMQ_HOST', '127.0.0.1') %>
port: <%= ENV.fetch('RABBITMQ_PORT', '5672') %>
username: <%= ENV.fetch('RABBITMQ_USERNAME', 'postal') %>
password: <%= ENV.fetch('RABBITMQ_PASSWORD', '') %>
vhost: <%= ENV.fetch('RABBITMQ_VHOST', '/postal') %>
tls: <%= ENV.fetch('RABBITMQ_TLS', 'false') %>
verify_peer: <%= ENV.fetch('RABBITMQ_VERIFY_PEER', 'true') %>
tls_ca_certificates: <%= ENV.fetch('RABBITMQ_TLS_CA_CERTIFICATES', '/etc/ssl/certs/ca-certificates.crt'.split(',').inspect) %>
logging:
rails_log: <%= ENV.fetch('LOGGING_RAILS_LOG', 'false') %>
graylog:
@@ -57,9 +47,6 @@ logging:
port: <%= ENV.fetch('GRAYLOG_PORT', '12201') %>
facility: <%= ENV.fetch('GRAYLOG_FACILITY', 'postal') %>
workers:
threads: <%= ENV.fetch('WORKER_THREADS', '4') %>
smtp_server:
port: <%= ENV.fetch('SMTP_SERVER_PORT', '25') %>
bind_address: "<%= ENV.fetch('SMTP_SERVER_BIND_ADDRESS', '::') %>"