Sha256: 7132dd92b0d0e70e201b11aa3cf7572eb6a91e07f13681885530acff97f75b5b
Contents?: true
Size: 977 Bytes
Versions: 19
Compression:
Stored size: 977 Bytes
Contents
# frozen_string_literal: true module DatadogBackup class Dashboards < Core def all_boards get_all.fetch('dashboards') end def api_service # The underlying class from Dogapi that talks to datadog client.instance_variable_get(:@dashboard_service) end def api_version 'v1' end def api_resource_name 'dashboard' end def backup logger.info("Starting diffs on #{::DatadogBackup::ThreadPool::TPOOL.max_length} threads") futures = all_boards.map do |board| Concurrent::Promises.future_on(::DatadogBackup::ThreadPool::TPOOL, board) do |board| id = board['id'] get_and_write_file(id) end end watcher = ::DatadogBackup::ThreadPool.watcher(logger) watcher.join if watcher.status Concurrent::Promises.zip(*futures).value! end def initialize(options) super(options) @banlist = %w[modified_at url].freeze end end end
Version data entries
19 entries across 19 versions & 1 rubygems