Revision 54600
Added by Sandro La Bruzzo about 5 years ago
modules/s3-objectStore-migration/trunk/s3_migration.py | ||
---|---|---|
34 | 34 |
try: |
35 | 35 |
key.set_contents_from_filename(fs_path) |
36 | 36 |
except Exception as e: |
37 |
time.sleep(10) |
|
38 |
key.set_contents_from_filename(fs_path) |
|
37 |
for k in range(10): |
|
38 |
try: |
|
39 |
time.sleep(10) |
|
40 |
key.set_contents_from_filename(fs_path) |
|
41 |
except Exception as e: |
|
42 |
print "Error on saving object on S3" |
|
43 |
print e |
|
44 |
print "Sleeping 10 seconds and retry" |
|
45 |
|
|
39 | 46 |
item.pop('_id', None) |
40 | 47 |
item.pop('fsPath') |
41 | 48 |
item['uri'] = 's3://%s/%s'%(bucket.name, key.name) |
Also available in: Unified diff
added skip store functionality