Gab-Social/app/workers/delete_chat_message_worker.rb

13 lines
280 B
Ruby
Raw Normal View History

2020-12-19 06:33:33 +00:00
# frozen_string_literal: true
class DeleteChatMessageWorker
include Sidekiq::Worker
sidekiq_options unique: :until_executed
def perform(chat_message_id)
return if chat_message_id.nil?
DeleteChatMessageService.new.call(ChatMessage.find(chat_message_id))
end
end