Sha256: f4856a53f9ac41dba15a5d387df3aa30412e668722f183746e840b4dd70de6ed
Contents?: true
Size: 681 Bytes
Versions: 1
Compression:
Stored size: 681 Bytes
Contents
module StrongMigrations module Migrator def ddl_transaction(migration, ...) return super unless StrongMigrations.lock_timeout_retries > 0 && use_transaction?(migration) # handle MigrationProxy class migration = migration.send(:migration) if migration.respond_to?(:migration, true) checker = migration.send(:strong_migrations_checker) return super if checker.skip? # retry migration since the entire transaction needs to be rerun checker.retry_lock_timeouts(check_committed: true) do # failed transaction reverts timeout, so need to re-apply checker.reset super(migration, ...) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
strong_migrations-2.1.0 | lib/strong_migrations/migrator.rb |