@task
def elasticsearch():
    if platform.linux_distribution()[0] == 'Ubuntu':
        run("sudo service elasticsearch restart")
    elif platform.system() == 'Darwin':  # Mac OSX
        run('elasticsearch')
    else:
        print(
            "Your system is not recognized, you will have to start elasticsearch manually")
Start a local elasticsearch server
dataset/ETHPy150Open CenterForOpenScience/scrapi/tasks.py/elasticsearch