Commit d93a97af authored by d.maklakov's avatar d.maklakov
Browse files

Обернул дамп ОСО для перехвата исключений.

parent 8589e7c5
Showing with 12 additions and 6 deletions
+12 -6
......@@ -48,11 +48,18 @@ public class DumpOsoProcessorImpl implements DumpOsoProcessor {
public void processDumpOsoQueue() {
StatisticEk4 statistic = new StatisticEk4();
do {
LOG.info(String.format("Start to process Dump OSO chunk: offset=%d, size=%d", queueOffset, DUMP_OSO_CHUNK_SIZE));
statistic = synchronizeChunk(DUMP_OSO_CHUNK_SIZE, queueOffset, statistic);
queueOffset += statistic.chunkOsoEventCount;
LOG.info(String.format("Dump OSO chunk is processed: events count=%d", statistic.chunkOsoEventCount));
try {
LOG.info(String.format("Start to process Dump OSO chunk: offset=%d, size=%d", queueOffset, DUMP_OSO_CHUNK_SIZE));
statistic = synchronizeChunk(DUMP_OSO_CHUNK_SIZE, queueOffset, statistic);
queueOffset += statistic.chunkOsoEventCount;
LOG.info(String.format("Dump OSO chunk is processed: events count=%d", statistic.chunkOsoEventCount));
} catch (Exception ex) {
LOG.error(String.format("Dump OSO processing failed on chunk: offset=%d, size=%d", queueOffset, DUMP_OSO_CHUNK_SIZE), ex);
} catch (Throwable ex) {
LOG.error("Dump OSO processing catch throwable", ex);
throw ex;
}
} while (statistic.chunkOsoEventCount != 0);
logStatistic(statistic);
......
......@@ -34,7 +34,6 @@ public enum DumpOsoEntityType {
return concrete;
}
}
//throw new IllegalArgumentException(String.format("Incorrect event type (%d) for warehouse event queue", type));
return null;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment