Skip to content

Instantly share code, notes, and snippets.

@Loschcode
Created April 25, 2022 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Loschcode/581b37afb7bd2dfeadd4fc5e721a3d34 to your computer and use it in GitHub Desktop.
Save Loschcode/581b37afb7bd2dfeadd4fc5e721a3d34 to your computer and use it in GitHub Desktop.
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