Set dry_run via environment variable

Can be enabled via `DRYRUN=true`
This commit is contained in:
Garret Alfert 2016-02-24 13:04:49 +01:00
parent 3b391246ed
commit 33731f793a

View File

@ -19,7 +19,7 @@ class Migrator
@swift_host = @settings["swift"]["host"]
@swift_token = File.read("tmp/swift_token.txt")
@dry_run = false # disables writing anything to Redis when true
@dry_run = ENV["DRYRUN"] || false # disables writing anything to Redis when true
@logger = Logger.new("log/migrate_metadata_to_redis.log")
log_level = ENV["LOGLEVEL"] || "INFO"