@@ -118,36 +118,40 @@ public void aggregate(final Task<?> task, final String proxyDir) {
118
118
119
119
public void aggregate (final Task <?> task , final String proxyDir , final Boolean aggregate ,
120
120
final Integer maxAggregation , final Long maxStreamSize ) {
121
- this .task = task ;
122
- if (proxyDir != null ) {
123
- this .proxyDir = proxyDir ;
124
- }
125
- this .aggregate = aggregate ;
126
- if (maxAggregation != null ) {
127
- stroomZipRepositoryProcessor .setMaxAggregation (maxAggregation );
128
- }
129
- if (maxStreamSize != null ) {
130
- stroomZipRepositoryProcessor .setMaxStreamSize (maxStreamSize );
131
- }
121
+ try {
122
+ this .task = task ;
123
+ if (proxyDir != null ) {
124
+ this .proxyDir = proxyDir ;
125
+ }
126
+ this .aggregate = aggregate ;
127
+ if (maxAggregation != null ) {
128
+ stroomZipRepositoryProcessor .setMaxAggregation (maxAggregation );
129
+ }
130
+ if (maxStreamSize != null ) {
131
+ stroomZipRepositoryProcessor .setMaxStreamSize (maxStreamSize );
132
+ }
132
133
133
- taskMonitor .addTerminateHandler (() -> stop ());
134
+ taskMonitor .addTerminateHandler (() -> stop ());
134
135
135
- final LogExecutionTime logExecutionTime = new LogExecutionTime ();
136
- LOGGER .info ("exec() - started" );
136
+ final LogExecutionTime logExecutionTime = new LogExecutionTime ();
137
+ LOGGER .info ("exec() - started" );
137
138
138
- boolean complete = false ;
139
- while (!complete && !taskMonitor .isTerminated ()) {
140
- taskMonitor .info ("Aggregate started %s, maxAggregation %s, maxAggregationScan %s, maxStreamSize %s" ,
141
- DateUtil .createNormalDateTimeString (System .currentTimeMillis ()),
142
- ModelStringUtil .formatCsv (stroomZipRepositoryProcessor .getMaxAggregation ()),
143
- ModelStringUtil .formatCsv (stroomZipRepositoryProcessor .getMaxFileScan ()),
144
- ModelStringUtil .formatIECByteSizeString (stroomZipRepositoryProcessor .getMaxStreamSize ()));
139
+ boolean complete = false ;
140
+ while (!complete && !taskMonitor .isTerminated ()) {
141
+ taskMonitor .info ("Aggregate started %s, maxAggregation %s, maxAggregationScan %s, maxStreamSize %s" ,
142
+ DateUtil .createNormalDateTimeString (System .currentTimeMillis ()),
143
+ ModelStringUtil .formatCsv (stroomZipRepositoryProcessor .getMaxAggregation ()),
144
+ ModelStringUtil .formatCsv (stroomZipRepositoryProcessor .getMaxFileScan ()),
145
+ ModelStringUtil .formatIECByteSizeString (stroomZipRepositoryProcessor .getMaxStreamSize ()));
145
146
146
- final StroomZipRepository stroomZipRepository = new StroomZipRepository (this .proxyDir );
147
- complete = stroomZipRepositoryProcessor .process (stroomZipRepository );
148
- }
147
+ final StroomZipRepository stroomZipRepository = new StroomZipRepository (this .proxyDir );
148
+ complete = stroomZipRepositoryProcessor .process (stroomZipRepository );
149
+ }
149
150
150
- LOGGER .info ("exec() - completed in %s" , logExecutionTime );
151
+ LOGGER .info ("exec() - completed in %s" , logExecutionTime );
152
+ } catch (final Exception e ) {
153
+ LOGGER .error (e .getMessage (), e );
154
+ }
151
155
}
152
156
153
157
private List <StreamTargetStroomStreamHandler > openStreamHandlers (final Feed feed ) {
0 commit comments