You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
356 B

# frozen_string_literal: true
class Fasp::BaseWorker
include Sidekiq::Worker
sidekiq_options queue: 'fasp'
private
def with_provider(provider)
return unless provider.confirmed? && provider.available?
yield
rescue *Mastodon::HTTP_CONNECTION_ERRORS
raise if provider.available?
ensure
provider.update_availability!
end
end