Sha256: a7e9d3ba4cac1b08b6c119faced169ab25e08904cdef2acb344cc1e0b5b08ae8
Contents?: true
Size: 933 Bytes
Versions: 53
Compression:
Stored size: 933 Bytes
Contents
require 'appsignal/integrations/capistrano/careful_logger' module Appsignal class Marker include Appsignal::CarefulLogger attr_reader :marker_data, :config, :logger ACTION = 'markers' def initialize(marker_data, config, logger) @marker_data = marker_data @config = config @logger = logger end def transmit begin transmitter = Transmitter.new(ACTION, config) logger.info("Notifying Appsignal of deploy with: revision: #{marker_data[:revision]}, user: #{marker_data[:user]}") result = transmitter.transmit(marker_data) if result == '200' logger.info('Appsignal has been notified of this deploy!') else raise "#{result} at #{transmitter.uri}" end rescue Exception => e carefully_log_error( "Something went wrong while trying to notify Appsignal: #{e}" ) end end end end
Version data entries
53 entries across 53 versions & 1 rubygems