Skip to content

after_commit callbacks stay permanently deactivated for the rest of that process's lifetime#160

Merged
dmbf29 merged 1 commit into
mainfrom
fix/database-refresh
Jun 21, 2026
Merged

after_commit callbacks stay permanently deactivated for the rest of that process's lifetime#160
dmbf29 merged 1 commit into
mainfrom
fix/database-refresh

Conversation

@dmbf29

@dmbf29 dmbf29 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

No description provided.

@dmbf29 dmbf29 requested a review from Copilot June 21, 2026 04:22
@dmbf29 dmbf29 added the bug Something isn't working label Jun 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a reliability issue in DatabaseViews.run_without_callback where an exception inside the provided block could leave after_commit callbacks permanently disabled for the lifetime of the process.

Changes:

  • Wraps the callback deactivation block in begin/ensure to guarantee callback reactivation.
  • Tracks whether the block completed successfully to decide whether then_refresh should trigger a refresh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/services/database_views.rb
@dmbf29 dmbf29 merged commit 22546aa into main Jun 21, 2026
1 check passed
@dmbf29 dmbf29 deleted the fix/database-refresh branch June 21, 2026 04:26
@dmbf29 dmbf29 restored the fix/database-refresh branch June 21, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants