mirror of
https://github.com/postalserver/postal.git
synced 2026-10-19 10:46:32 +00:00
feat: new background work process
This removes all previous dependencies on RabbitMQ and the need to run separate cron and requeueing processes.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WebhookDeliveryService
|
||||
|
||||
def initialize(webhook_delivery:)
|
||||
@webhook_delivery = webhook_delivery
|
||||
end
|
||||
|
||||
# TODO: move the logic from WebhookDelivery#deliver in to this service.
|
||||
#
|
||||
def call
|
||||
if @webhook_delivery.deliver
|
||||
log "Succesfully delivered"
|
||||
else
|
||||
log "Delivery failed"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user