Skip to content

Postpone configuration (database introspection) #264

Closed
@Envek

Description

@Envek

Please consider to do database introspection not when calling has_closure_tree method (on application code load) but some time later.

I'm using Docker Compose for development and because of that I'm launching container with Rails application immediately after container with database has started. Sometimes has_closure_tree will be invoked and will attempt to access DB to analyze tables before RDBMS is ready to serve clients. So, application will fail to load and application server will be terminated).

Rails itself (without closure_tree) doesn't hit the DB until first request will come, so everything works as expected even if DB was not ready at time of first request (ActiveRecord will analyze tables when DB will be ready).

Also request time (or first model access time) configuration should fix other issues like #214

Thank you for closure_tree!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions