コード例 #1
0
def main():
    """Start the Gunicorn WSGI.

    Args:
        None

    Returns:
        None

    """
    # Initialize key variables
    config = Config()
    

    # Make sure we have a database
    _ = connectivity()

    # Create agent object for web_proxy
    agent_gunicorn = Agent(PATTOO_API_WEB_PROXY, config=config)

    # Create agent for daemon
    agent_api = AgentAPI(
        PATTOO_API_WEB_NAME,
        PATTOO_API_WEB_PROXY,
        PATTOO_API_WEB,
        config=config)

    # Do control (API first, Gunicorn second)
    cli = AgentCLI()
    cli.control(agent_api)
    cli.control(agent_gunicorn)
コード例 #2
0
def main():
    """Main function to start the Gunicorn WSGI."""
    # Initialize key variables
    config = Config()

    # Make sure we have a database
    _ = connectivity()

    # Create agent object for web_proxy
    agent_gunicorn = Agent(PATTOO_API_AGENT_PROXY, config=config)

    # Create agent for daemon
    config = Config()
    agent_api = AgentAPI(
        PATTOO_API_AGENT_NAME,
        PATTOO_API_AGENT_PROXY,
        PATTOO_API_AGENT,
        config=config)

    # Add set API email address
    agent_api.set_api_email()

    # Set up encryption using Pgpier in Agent
    agent_api.set_gnupg() # Creation and retrieval of Pgpier object

    # Do control (API first, Gunicorn second)
    cli = AgentCLI()
    cli.control(agent_api)
    cli.control(agent_gunicorn)
コード例 #3
0
def main():
    """Control the Gunicorn WSGI."""
    # Create Gunicorn object to daemonize
    agent_api = Agent(PATTOO_AGENT_OS_SPOKED_PROXY)

    # Create Flask object to daemonize
    config = configuration.ConfigSpoked()
    agent_gunicorn = AgentAPI(PATTOO_AGENT_OS_SPOKED,
                              PATTOO_AGENT_OS_SPOKED_PROXY,
                              API,
                              config=config)

    # Do control (Gunicorn first, Daemonized query second)
    cli = AgentCLI()
    cli.control(agent_gunicorn)
    cli.control(agent_api)
コード例 #4
0
ファイル: pattoo_webd.py プロジェクト: palisadoes/pattoo-web
def main():
    """Start the Gunicorn WSGI."""
    # Initialize key variables
    config = Config()

    # Get PID filenename for Gunicorn
    agent_gunicorn = Agent(PATTOO_WEBD_PROXY, config=config)

    # Get configuration
    agent_api = AgentAPI(PATTOO_WEBD_NAME,
                         PATTOO_WEBD_PROXY,
                         PATTOO_WEBD,
                         config=config)

    # Do control (API first, Gunicorn second)
    cli = AgentCLI()
    cli.control(agent_api)
    cli.control(agent_gunicorn)
コード例 #5
0
def main():
    """Main function to start the Gunicorn WSGI."""
    # Initialize key variables
    config = Config()

    # Make sure we have a database
    _ = connectivity()

    # Create agent object for web_proxy
    agent_gunicorn = Agent(PATTOO_API_AGENT_PROXY, config=config)

    # Create agent for daemon
    config = Config()
    agent_api = AgentAPI(PATTOO_API_AGENT_NAME,
                         PATTOO_API_AGENT_PROXY,
                         PATTOO_API_AGENT,
                         config=config)

    # Do control (API first, Gunicorn second)
    cli = AgentCLI()
    cli.control(agent_api)
    cli.control(agent_gunicorn)