Beispiel #1
0
    def __init__(self, uid, host, port, boss_port):
        self.uid = uid
        self.boss_port = boss_port
        self.host = host
        self.port = port
        self.boss_api_handler = BossClient(host, boss_port).boss_access

        if in_parent_process():
            save_pid_file('pretenders-mock-{0}.pid'.format(uid))
Beispiel #2
0
def run(host='localhost', port=8000):
    "Start the mock HTTP server"
    data.BOSS_PORT = port
    if in_parent_process():
        if settings.RUN_MAINTAINER:
            LOGGER.debug('Starting maintainer process')
            launch_maintainer()
        save_pid_file('pretenders-boss.pid')
    bottle.run(host=host, port=port, reloader=True)
Beispiel #3
0
    def __init__(self, uid, host, port, boss_port):
        self.uid = uid
        self.boss_port = boss_port
        self.host = host
        self.port = port
        self.boss_api_handler = BossClient(host, boss_port).boss_access

        if in_parent_process():
            save_pid_file('pretenders-mock-{0}.pid'.format(uid))
Beispiel #4
0
def run(host='localhost', port=8000):
    "Start the mock HTTP server"
    data.BOSS_PORT = port
    if in_parent_process():
        if settings.RUN_MAINTAINER:
            LOGGER.debug('Starting maintainer process')
            launch_maintainer()
        save_pid_file('pretenders-boss.pid')

    bottle.run(app=pretender_app, host=host, port=port, reloader=True)