Purple-Devs / health_check

Simple health check of Rails app for use with uptime checking sites like newrelic and pingdom
MIT License
476 stars 125 forks source link

Uses check_all_pending! instead of check_pending! per ActiveRecord re… #140

Open broosk1993 opened 11 months ago

broosk1993 commented 11 months ago

Uses check_all_pending! instead of check_pending! per ActiveRecord recommendation.

ActiveRecord now shows a warning that check_all_pending! should be used.

sharz1 commented 8 months ago

Also running into this warning with rails 7 upgrade. Can this be merged as part of https://github.com/Purple-Devs/health_check/issues/123 resolution?

c960657 commented 7 months ago

I suspect that calling check_all_pending! will cause random errors as those reported here:

The problem is hard to reproduce, but it seem to have gone away after I moved from the solution suggested here to calling ActiveRecord::Base.connection.migration_context.needs_migration? directly.