Use Redis hash for storing migration state instead of one key per user

This commit is contained in:
Garret Alfert 2016-09-07 17:05:27 +02:00
parent ad8a75a0ad
commit 685c82d068

View File

@ -53,11 +53,11 @@ class Migrator
end
def set_container_migration_state(type)
redis.set("rs:container_migration:#{username}", type) unless dry_run
redis.hset("rs:container_migration", username, type) unless dry_run
end
def delete_container_migration_state
redis.del("rs:container_migration:#{username}") unless dry_run
redis.hdel("rs:container_migration", username) unless dry_run
end
def work_on_dir(directory, parent_directory)