Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Created January 24, 2013 20:09
Show Gist options
  • Select an option

  • Save rhelmer/4627174 to your computer and use it in GitHub Desktop.

Select an option

Save rhelmer/4627174 to your computer and use it in GitHub Desktop.
diff --git a/socorro/storage/storageMover.py b/socorro/storage/storageMover.py
index 2a60f27..7090b3a 100644
--- a/socorro/storage/storageMover.py
+++ b/socorro/storage/storageMover.py
@@ -48,19 +48,27 @@ def move (conf,
destStorage = crashStoragePoolForDest.crashStorage()
ooid = ooidTuple[0]
try:
+ logger.debug('PROFILING - start getting json from filesystem:', ooid)
jsonContents = sourceStorage.get_meta(ooid)
+ logger.debug('PROFILING - done getting json from filesystem:', ooid)
except ValueError:
logger.warning('the json for %s is degenerate and cannot be loaded' \
' - saving empty json', ooid)
jsonContents = {}
+ logger.debug('PROFILING - start getting dump from filesystem:', ooid)
dumpContents = sourceStorage.get_raw_dumps(ooid)
+ logger.debug('PROFILING - done getting dump from filesystem:', ooid)
logger.debug('pushing %s to dest', ooid)
+ logger.debug('PROFILING - start saving json and dump to hbase:', ooid)
result = destStorage.save_raw(ooid, jsonContents, dumpContents)
+ logger.debug('PROFILING - done saving json and dump to hbase:', ooid)
if result == cstore.CrashStorageSystem.ERROR:
return iwf.FAILURE
elif result == cstore.CrashStorageSystem.RETRY:
return iwf.RETRY
+ logger.debug('PROFILING - start removing crash from filesystem:', ooid)
sourceStorage.quickDelete(ooid)
+ logger.debug('PROFILING - done removing crash from filesystem:', ooid)
return iwf.OK
except Exception, x:
sutil.reportExceptionAndContinue(logger)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment