Skip to content

Commit

Permalink
Fix MigrationRunner to consider run_background_migrations_inline
Browse files Browse the repository at this point in the history
…proc
  • Loading branch information
fatkodima committed Feb 21, 2024
1 parent f2fe3c9 commit 3b9d4e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## master (unreleased)

- Fix `MigrationRunner` to consider `run_background_migrations_inline` proc

## 0.14.0 (2024-02-01)

- Add ability to configure whether background migrations should be run inline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ def run_migration_job
# @note This method should not be used in production environments
#
def run_all_migration_jobs
raise "This method is not intended for use in production environments" if !Utils.developer_env?
run_inline = OnlineMigrations.config.run_background_migrations_inline
if run_inline && !run_inline.call
raise "This method is not intended for use in production environments"
end

return if migration.completed?

mark_as_running
Expand Down

0 comments on commit 3b9d4e8

Please sign in to comment.