Skip to content

Commit f5df9cf

Browse files
authored
Merge pull request #30 from exceptionless/testing
Nits
2 parents c4e01a1 + 3ce5358 commit f5df9cf

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/main/java/com/exceptionless/exceptionlessclient/queue/DefaultEventQueue.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class DefaultEventQueue implements EventQueueIF {
2626
private static final String QUEUE_TIMER_NAME = "queue-timer";
2727
private static final Integer DEFAULT_PROCESSING_INTERVAL_IN_SECS = 10;
2828
private static final Double BATCH_SIZE_DIVISOR = 1.5;
29+
private static final Integer DEFAULT_SUSPENSION_DURATION_IN_MINS = 5;
2930

3031
private final StorageProviderIF storageProvider;
3132
private final Configuration configuration;
@@ -100,12 +101,10 @@ public void enqueue(Event event) {
100101
}
101102

102103
long timestamp = storageProvider.getQueue().save(event);
103-
String logText =
104-
String.format("type: %s", event.getType())
105-
+ (event.getReferenceId() != null
106-
? String.format(", refId: %s", event.getReferenceId())
107-
: "");
108-
LOG.info(String.format("Enqueueing event: %s %s", timestamp, logText));
104+
LOG.info(
105+
String.format(
106+
"Enqueueing event: %s type: %s, refId: %s",
107+
timestamp, event.getType(), event.getReferenceId()));
109108
}
110109

111110
private boolean shouldDiscard() {
@@ -245,7 +244,7 @@ private void suspendProcessing(Duration duration) {
245244
public void suspendProcessing(
246245
Duration duration, boolean discardFutureQueueItems, boolean clearQueue) {
247246
if (duration == null) {
248-
duration = Duration.ofMinutes(5);
247+
duration = Duration.ofMinutes(DEFAULT_SUSPENSION_DURATION_IN_MINS);
249248
}
250249

251250
LOG.info(String.format("Suspending processing for %s", duration));

0 commit comments

Comments
 (0)