<commit_before>from fabric.api import run, env, cd

env.user = 'ubuntu'
env.tsuru_path = '/home/ubuntu/.go/src/github.com/timeredbull/tsuru'
env.collector_path = '%s/collector' % env.tsuru_path
env.webserverd_path = '%s/api/webserverd' % env.tsuru_path


def stop():
    run('killall -9 webserverd')
    run('killall -9 collector')


def update():
    run('go get -u github.com/timeredbull/tsuru/collector')
    run('go get -u github.com/timeredbull/tsuru/api/webserverd')


def build():
    with cd(env.collector_path):
        run("go build -o collector main.go")

    with cd(env.webserverd_path):
        run("go build -o webserverd main.go")


def start():
    run("nohup %s/collector >& /dev/null < /dev/null &" % env.collector_path, pty=False)
    run("nohup %s/webserverd >& /dev/null < /dev/null &" % env.webserverd_path, pty=False)


def deploy():
    stop()
    update()
    build()
    start()
<commit_msg>fabfile: warning instead of fail if webserverd or collector is not running<commit_after># -*- coding: utf-8 -*-
from fabric.api import cd, env, run, settings

env.user = 'ubuntu'
env.tsuru_path = '/home/ubuntu/.go/src/github.com/timeredbull/tsuru'
env.collector_path = '%s/collector' % env.tsuru_path
env.webserverd_path = '%s/api/webserverd' % env.tsuru_path


def stop():
    with settings(warn_only=True):
        run('killall -KILL webserverd collector')


def update():
    run('go get -u github.com/timeredbull/tsuru/collector')
    run('go get -u github.com/timeredbull/tsuru/api/webserverd')


def build():
    with cd(env.collector_path):
        run("go build -o collector main.go")

    with cd(env.webserverd_path):
        run("go build -o webserverd main.go")


def start():
    run("nohup %s/collector >& /dev/null < /dev/null &" % env.collector_path, pty=False)
    run("nohup %s/webserverd >& /dev/null < /dev/null &" % env.webserverd_path, pty=False)


def deploy():
    stop()
    update()
    build()
    start()

{'fraction_non_alphanumeric': 0.15684264479753973, 'fraction_numerical': 0.0015376729882111738, 'mean_word_length': 3.376681614349776, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7092561', 'n_tokens_mistral': 751, 'n_tokens_neox': 715, 'n_words': 155}