File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
src/main/java/ch/ethz/seb/sps/server/servicelayer/impl Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -165,17 +165,21 @@ public void storeScreenshot(
165165 }
166166
167167 private void processStore (final Collection <ScreenshotQueueData > batch ) {
168- batch .clear ();
169- this .screenshotDataQueue .drainTo (batch );
168+ try {
169+ batch .clear ();
170+ this .screenshotDataQueue .drainTo (batch );
170171
171- if (batch .isEmpty ()) {
172- return ;
173- }
172+ if (batch .isEmpty ()) {
173+ return ;
174+ }
174175
175- if (batchStore ) {
176- applyBatchStore (batch );
177- } else {
178- applySingleStore (batch );
176+ if (batchStore ) {
177+ applyBatchStore (batch );
178+ } else {
179+ applySingleStore (batch );
180+ }
181+ } catch (Exception e ) {
182+ log .error ("Failed to drain and process batch - should never happen: " , e );
179183 }
180184 }
181185
You can’t perform that action at this time.
0 commit comments