How to use the oncall.app.get_wsgi_app function in oncall

To help you get started, we’ve selected a few oncall examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linkedin / oncall / src / oncall / bin / run_server.py View on Github external
def load(self):
        import oncall
        reload(oncall.utils)

        import oncall.app
        app = oncall.app.get_wsgi_app()

        if not self.skip_build_assets:
            for r in gc.get_referrers(self):
                if isinstance(r, dict) and '_num_workers' in r:
                    gunicorn_arbiter = r

            # only build assets on one worker to avoid race conditions
            if gunicorn_arbiter['worker_age'] % self.options['workers'] == 0:
                import oncall.ui
                oncall.ui.build_assets()

        return app