مراية لـ
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.
هذا الالتزام موجود في:
40
spec/factories/queued_message_factory.rb
Normal file
40
spec/factories/queued_message_factory.rb
Normal file
@@ -0,0 +1,40 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: queued_messages
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# attempts :integer default(0)
|
||||
# batch_key :string(255)
|
||||
# domain :string(255)
|
||||
# locked_at :datetime
|
||||
# locked_by :string(255)
|
||||
# manual :boolean default(FALSE)
|
||||
# retry_after :datetime
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# ip_address_id :integer
|
||||
# message_id :integer
|
||||
# route_id :integer
|
||||
# server_id :integer
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_queued_messages_on_domain (domain)
|
||||
# index_queued_messages_on_message_id (message_id)
|
||||
# index_queued_messages_on_server_id (server_id)
|
||||
#
|
||||
FactoryBot.define do
|
||||
factory :queued_message do
|
||||
server
|
||||
message_id { 1234 }
|
||||
domain { "example.com" }
|
||||
batch_key { nil }
|
||||
|
||||
trait :locked do
|
||||
locked_by { "worker1" }
|
||||
locked_at { 5.minutes.ago }
|
||||
end
|
||||
end
|
||||
end
|
||||
المرجع في مشكلة جديدة
حظر مستخدم