Sha256: ecb4987e96219b707cb6f030fcebf2064c1e43100a0238587afd9857cdc8b44b
Contents?: true
Size: 830 Bytes
Versions: 3
Compression:
Stored size: 830 Bytes
Contents
# frozen_string_literal: true module DatadogBackup class Dashboards < Core 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_dashboards.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 watcher.join if watcher.status Concurrent::Promises.zip(*futures).value! end def all_dashboards get_all.fetch('dashboards') end def initialize(options) super(options) @banlist = %w[modified_at url].freeze end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
datadog_backup-3.0.0 | lib/datadog_backup/dashboards.rb |
datadog_backup-3.0.0.alpha.2 | lib/datadog_backup/dashboards.rb |
datadog_backup-3.0.0.alpha.1 | lib/datadog_backup/dashboards.rb |