مراية لـ
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.
هذا الالتزام موجود في:
@@ -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', '::') %>"
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم