Created
April 25, 2022 20:45
-
-
Save Loschcode/581b37afb7bd2dfeadd4fc5e721a3d34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MigrateConcurrently | |
... | |
def perform | |
... | |
Logger.info( | |
... | |
cycle: cycles.current, | |
max_cycles: cycles.max, | |
) | |
if cycles.max? | |
... | |
end | |
cycles.next | |
perform | |
end | |
private | |
def cycles | |
@cycles ||= Cycles.new(max: 2) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment