Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to override environment on spring client startup #654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mildred
Copy link

@mildred mildred commented Sep 28, 2021

Spring.env_override can be set to

  • false (default) for current behaviour
  • true to always override client provided environment variables in the
    application
  • an array listing the environment variables to override in the
    application

The after_fork callback can take an ptional argument that contains the
Spring provided environment to help the application detect when there is
a mismatch between application environment and provided environment.

Fixes #653 and I believe will help with #420 (although a server restart is not performed, only environment overrides)

Spring.env_override can be set to
- false (default) for current behaviour
- true to always override client provided environment variables in the
  application
- an array listing the environment variables to override in the
  application

The after_fork callback can take an ptional argument that contains the
Spring provided environment to help the application detect when there is
a mismatch between application environment and provided environment.

connect_database
srand

invoke_after_fork_callbacks
invoke_after_fork_callbacks(OpenStruct.new(
Copy link
Member

Choose a reason for hiding this comment

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

Can we create a class for this object here? It would allow us to document it for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Environment variables changed by rails cannot be reloaded
2 participants