Class: SwarmClusterCliOpe::SyncConfigs::MongoDb::EnvConfigs

Inherits:
BaseDatabase::EnvConfigs show all
Defined in:
lib/swarm_cluster_cli_ope/sync_configs/mongo_db.rb

Overview

Classe interna che rappresenta le configurazioni del DB

Instance Method Summary collapse

Methods inherited from EnvConfigs

#container, define_cfgs, #initialize, #service_name

Constructor Details

This class inherits a constructor from SwarmClusterCliOpe::SyncConfigs::EnvConfigs

Instance Method Details

#exclude_from_syncObject

Possiamo definire una lista, comma-separated, per limitare le collections da non importare



42
# File 'lib/swarm_cluster_cli_ope/sync_configs/mongo_db.rb', line 42

define_cfgs :exclude_from_sync, default_env: "EXCLUDE_FROM_SYNC", configuration_name: :exclude_from_sync, default_value: ""

#excluded_collectionsArray<String>

Helper per avere un array di collections da non sincronizzare, specifico per mongodb

Returns:

  • (Array<String>)


47
48
49
50
# File 'lib/swarm_cluster_cli_ope/sync_configs/mongo_db.rb', line 47

def excluded_collections
  return [] if exclude_from_sync.nil?
  exclude_from_sync.split(",").compact
end