1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00
الملفات
postal/spec/factories/queued_message_factory.rb
Adam Cooke dc8e895bfe feat: new background work process
This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
2024-02-23 22:51:33 +00:00

41 أسطر
954 B
Ruby

# 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