Beispiel #1
0
def incr_proc(name):

    return run_command(
        func='incrproc',
        args=(name, ),
        message='added one process to the {watcher} pool'.format(watcher=name),
        redirect_url=url('watcher', name=name))
Beispiel #2
0
def decr_proc(name):
    return run_command(
        func='decrproc',
        args=(name, ),
        message='removed one process from the {watcher} pool'.format(
            watcher=name),
        redirect_url=url('watcher', name=name))
Beispiel #3
0
def add_watcher():
    return run_command('add_watcher',
                       kwargs=request.POST,
                       message='added a new watcher',
                       redirect_url=url('watcher', name=request.POST),
                       redirect_on_error=url('index'))
Beispiel #4
0
def switch(name):
    return run_command(func='switch_status', args=(name,),
                       message='status switched', redirect_url=url('index'))
Beispiel #5
0
def incr_proc(name):

    return run_command(
        func='incrproc', args=(name,),
        message='added one process to the {watcher} pool'.format(watcher=name),
        redirect_url=url('watcher', name=name))
Beispiel #6
0
def decr_proc(name):
    return run_command(
        func='decrproc', args=(name,),
        message='removed one process from the {watcher} pool'.format(
            watcher=name),
        redirect_url=url('watcher', name=name))
Beispiel #7
0
def kill_process(name, pid):
    return run_command(
        func='killproc', args=(name, pid),
        message='process {pid} killed sucessfully'.format(pid=pid),
        redirect_url=url('watcher', name=name))
Beispiel #8
0
def add_watcher():
    return run_command('add_watcher',
                       kwargs=request.POST,
                       message='added a new watcher',
                       redirect_url=url('watcher', name=request.POST),
                       redirect_on_error=url('index'))
Beispiel #9
0
def switch(name):
    return run_command(func='switch_status',
                       args=(name, ),
                       message='status switched',
                       redirect_url=url('index'))
Beispiel #10
0
def kill_process(name, pid):
    return run_command(
        func='killproc',
        args=(name, pid),
        message='process {pid} killed sucessfully'.format(pid=pid),
        redirect_url=url('watcher', name=name))
Beispiel #11
0
def add_watcher():
    return run_command('add_watcher',
                       kwargs=request.POST,
                       message='added a new watcher',
                       redirect_url='/watchers/%(name)s' % request.POST,
                       redirect_on_error='/')