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

Add a setting to append additional code to wsgi/fcgi deployment scripts #78

Closed
wants to merge 1 commit into from

Conversation

dbreen
Copy link

@dbreen dbreen commented Jul 25, 2013

The existing initialization setting is handy for adding extra code to the wsgi files such as for loading celery, but for other purposes like New Relic integration, there's no way to wrap the application object with an agent. This change creates a new deploy_script_extra setting that appends its value to the .wsgi/.fcgi files.

Example usage:

deploy_script_extra =
    import newrelic.agent
    newrelic.agent.initialize('/etc/newrelic.ini', 'app')
    application = newrelic.agent.WSGIApplicationWrapper(application)

@reinout
Copy link
Collaborator

reinout commented May 27, 2014

I copied the code to the latest master and merged it. Looks useful!

I'll make a release soon.

@reinout
Copy link
Collaborator

reinout commented Jun 16, 2014

Warning: in 1.10 I renamed the deploy_script_extra option to deploy-script-extra for consistency with the other options. So: dashes instead of underscores.

I do raise an error when the old one is found, as it seems pretty essential for your deployments and the error shouldn't pass through silently.

@dbreen
Copy link
Author

dbreen commented Jun 16, 2014

Makes sense, thanks for the heads up!

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.

None yet

2 participants