Skip to content

Commit

Permalink
Add debug statement to troubleshoot issues in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
pns-nirmata committed Oct 21, 2022
1 parent 2edf85a commit 5315a4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.nirmata.workflow</groupId>
<artifactId>nirmata-workflow</artifactId>
<version>0.11.0</version>
<version>0.11.1</version>

<properties>
<jdk-version>17</jdk-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,15 @@ private void runLoop() {
private void submitToWorkerGently(ExecutableTask task) {
boolean couldSubmit = false;
// Submit to executor service with backpressure
for (int i = 0; !couldSubmit; i++) {
while (!couldSubmit) {
try {
log.debug("KafkaQueueConsumer submitting task to workerservice {}", task);
executorWorkerService.submit(() -> taskRunner.executeTask(task));
couldSubmit = true;
} catch (RejectedExecutionException ex) {
log.warn("Slow executors, and more work pumped in {}", task);
try {
Thread.sleep(1000);
if (i % 10 == 0) {
log.warn("Slow executors, and more work pumped in");
}
} catch (InterruptedException _ex) {
}
} catch (Exception ex) {
Expand Down

0 comments on commit 5315a4d

Please sign in to comment.