Sha256: 68f7a82461532e276a7f176cfeaec24f4d2c4b9927856d710c0619875831996c
Contents?: true
Size: 557 Bytes
Versions: 10
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true module Shipit class BackgroundJob < ActiveJob::Base class << self attr_accessor :timeout end # Write actions can sometimes fail intermittently, particulary for large and/or busy repositories retry_on(Octokit::BadGateway, Octokit::InternalServerError) def perform(*) with_timeout do super end end private def with_timeout(&block) return yield unless timeout Timeout.timeout(timeout, &block) end def logger Rails.logger end end end
Version data entries
10 entries across 10 versions & 1 rubygems