27c5270bf5869d2a59e0365174e24b453cac4044,lambdas/access_counts/index.py,,delete_temp_dir,#,169

Before Change



        if list_response["IsTruncated"]:
            params.update(dict(
                ContinuationToken=list_response["ContinuationToken"]
            ))
        else:
            break

After Change


        MaxKeys=1000,  // The max we"re allowed to delete at once.
    )
    paginator = s3.get_paginator("list_objects_v2")
    for list_response in paginator.paginate(**params):
        contents = list_response.get("Contents")
        if not contents:
            break

        delete_response = s3.delete_objects(
            Bucket=QUERY_RESULT_BUCKET,
            Delete=dict(
                Objects=[dict(
                    Key=obj["Key"]
                ) for obj in contents]
            )
        )
        errors = delete_response.get("Errors")
        if errors:
            print(errors)
            raise Exception("Failed to delete the temporary directory")


def handler(event, context):
    delete_temp_dir()

    // Drop old Athen tables from previous runs.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: quiltdata/quilt
Commit Name: 27c5270bf5869d2a59e0365174e24b453cac4044
Time: 2019-06-20
Author: dima@quiltdata.io
File Name: lambdas/access_counts/index.py
Class Name:
Method Name: delete_temp_dir


Project Name: mlflow/mlflow
Commit Name: 0539a16f841f990717b3d1260e9670074e30a71c
Time: 2019-07-03
Author: aaron@databricks.com
File Name: mlflow/store/file_store.py
Class Name: FileStore
Method Name: _search_runs


Project Name: mlflow/mlflow
Commit Name: 0539a16f841f990717b3d1260e9670074e30a71c
Time: 2019-07-03
Author: aaron@databricks.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: _search_runs