Project

General

Profile

« Previous | Next » 

Revision 54587

fixed bug on calling function exist item on s3

View differences:

s3_migration.py
8 8

  
9 9

  
10 10
def file_exist(bucket, file_path):
11
	return len(list(bucket.objects.filter(Prefix=file_path))) > 0
11
	c =bucket.get_key(file_path)
12
	if c is not None and c.size > 0:
13
		return True
14
	return False
12 15

  
13 16
def exportItemForMongoCollection(obsId, db, bucket, log_file):	
14 17
	destination_collection =db[ 's3_'+obsId[:36]]

Also available in: Unified diff