1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-22 15:48:18 +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 حذوفات

عرض الملف

@@ -0,0 +1,16 @@
# frozen_string_literal: true
class ExpireHeldMessagesScheduledTask < ApplicationScheduledTask
def call
Server.all.each do |server|
messages = server.message_db.messages(where: {
status: "Held",
hold_expiry: { less_than: Time.now.to_f }
})
messages.each(&:cancel_hold)
end
end
end