Skip to content

Instantly share code, notes, and snippets.

@Loschcode
Created April 25, 2022 20:48
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/a121ae4289eec8dca2803a6b314046b8 to your computer and use it in GitHub Desktop.
Save Loschcode/a121ae4289eec8dca2803a6b314046b8 to your computer and use it in GitHub Desktop.
class MigrateConcurrently
DELAY_BETWEEN_CYCLES_IN_SECONDS = 3
MAX_CYCLES = 100
def initialize; end
def perform
Logger.info(
...
delay_between_cycles_in_seconds: DELAY_BETWEEN_CYCLES_IN_SECONDS,
)
sleep DELAY_BETWEEN_CYCLES_IN_SECONDS
...
end
private
def cycles
@cycles ||= Cycles.new(max: MAX_CYCLES)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment