def METHOD_NAME():
    # very safe password - only reachable from localhost
    conn = psycopg2.connect(
        "dbname=gocd user=gocd_database_user password=gocd_database_password host=localhost"
    )
    with conn.cursor() as cur:
        cur.execute("SELECT distinct name from pipelines")
        pipelines = sorted([row[0] for row in cur.fetchall()])
        for pipeline in pipelines:
            remove_old_runs(cur, pipeline)
            conn.commit()
        cur.execute(
            """delete from modifiedfiles where modificationid in
               (select id from modifications where modifiedtime < current_date - interval '10' day)"""
        )
        # cur.execute("delete from modifications where modifiedtime < current_date - interval '10' day")
    conn.close()