require 'gds_api/publishing_api_v2'

module Services
  def self.publishing_api
    @publishing_api ||= GdsApi::PublishingApiV2.new(
      Plek.find('publishing-api'),
      bearer_token: ENV['PUBLISHING_API_BEARER_TOKEN'] || 'example'
    )
  end
end

require 'gds_api/publishing_api_v2'

module Services
  def self.publishing_api
    @publishing_api ||= GdsApi::PublishingApiV2.new(
      Plek.find('publishing-api'),
      bearer_token: (ENV['PUBLISHING_API_BEARER_TOKEN'] || 'example'),
      timeout: 10,
    )
  end
end

Set publishing-api timeout to 10 seconds
Set publishing-api timeout to 10 seconds

Publishing API is sometimes a bit slow when handling large linksets
like the education taxonomy.
