Commit graph

4 commits

Author SHA1 Message Date
Gabriel Mazetto
7c8920c9dc Extract common logic to HashedStorage::BaseWorker
New class contains the ExclusiveLease specifics that is shared among
both the Migration and Rollback workers.
2019-03-01 15:49:20 +01:00
Gabriel Mazetto
fc0ff92807 Added Rollbacker workers and support on the rake task
Rollback is done similar to Migration for the Hashed Storage.
It also shares the same ExclusiveLease key to prevent both happening
at the same time.

All Hashed Storage related workers now share the same queue namespace
which allows for assigning dedicated workers easily.
2019-03-01 15:49:20 +01:00
Gabriel Mazetto
d63380fa93 Refactor ProjectMigrate and ProjectRollback workers
Moved to HashedStorage namespace, and added them to the
`:hashed_storage` queue namespace
2019-03-01 15:49:20 +01:00
Gabriel Mazetto
7bc16889df Refactor Storage Migration
Specs were reviewed and improved to better cover the current behavior.
There was some standardization done as well to facilitate the
implementation of the rollback functionality.

StorageMigratorWorker was extracted to HashedStorage namespace were
RollbackerWorker will live one as well.
2019-01-25 20:26:35 +01:00