Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 830 Bytes

File metadata and controls

29 lines (25 loc) · 830 Bytes

Gunicorn

Installation/Setup

  1. Install aikido_zen package with pip :
pip install aikido_zen
  1. Use the following template for your gunicorn_config.py file :
import aikido_zen.decorators.gunicorn as aik

@aik.post_fork
def post_fork(server, worker):
    # If you already have a config file, replace pass with your own code.
    pass

And make sure to include this config when starting gunicorn by adding the -c gunicorn_config.py flag.

gunicorn -c gunicorn_config.py --workers ...
  1. Setting your environment variables : Make sure to set your token in order to communicate with Aikido's servers
AIKIDO_TOKEN="AIK_RUNTIME_YOUR_TOKEN_HERE"
  • Enabling extra debugging (optional): AIKIDO_DEBUG=1
  • Enabling blocking using an env variable (optional): AIKIDO_BLOCK=1