@task
def restart_search():
    run("curl -XPOST 'http://localhost:9200/_shutdown'")
    if platform.linux_distribution()[0] == 'Ubuntu':
        run("sudo service elasticsearch restart")
    elif platform.system() == 'Darwin':  # Mac OSX
        run('elasticsearch')
Returns how long since the API Query response was last requested.
dataset/ETHPy150Open CenterForOpenScience/scrapi/tasks.py/restart_search--crossover with--dataset/ETHPy150Open googleanalytics/google-analytics-super-proxy/src/models/db_models.py/ApiQuery.last_request_timedelta