Sha256: 7391d9e905183af4ee64d57d1f3b188dc68b81b804bc495a92a82bc3bf79c7c4
Contents?: true
Size: 833 Bytes
Versions: 46
Compression:
Stored size: 833 Bytes
Contents
# typed: false # frozen_string_literal: true # Send updated data to Yetto to store in the database # This can be used to update installation data or message data class UpdateYettoJob < ApplicationJob queue_as :update_yetto def perform(params) type = params.delete(:type) params.fetch(:inbox, {}).fetch(:id, nil) plug_installation_id = params.fetch(:plug_installation, {}).fetch(:id, nil) message_id = params.fetch(:message, {}).fetch(:id, nil) case type when "update_plug_installation" YettoService.update_plug_installation(plug_installation_id, params) when "create_message_reply" YettoService.create_message_reply(message_id, plug_installation_id, params) when "add_message_metadata" YettoService.update_message(message_id, plug_installation_id, params) end end end
Version data entries
46 entries across 46 versions & 1 rubygems