Skip to content

Commit

Permalink
fix(vertx): Increase timeout for git clone operation (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Jul 13, 2023
1 parent 8aeb521 commit 3eb5c6e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void startup(@Observes StartupEvent event) {
});
vertx.setPeriodic(TimeUnit.MINUTES.toMillis(3), TimeUnit.MINUTES.toMillis(25), v -> vertx.eventBus()
.publish("miner", new MineNextProject(QodanaPeriodicMiner.ANALYZER_NAME)));
vertx.setPeriodic(TimeUnit.MINUTES.toMillis(3), TimeUnit.MINUTES.toMillis(15), v -> vertx.eventBus()
vertx.setPeriodic(TimeUnit.MINUTES.toMillis(2), TimeUnit.MINUTES.toMillis(15), v -> vertx.eventBus()
.publish("miner", new MineNextProject(SpoonPeriodicMiner.ANALYZER_NAME)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
import io.vertx.core.eventbus.DeliveryOptions;
import io.vertx.core.eventbus.Message;
import jakarta.enterprise.context.ApplicationScoped;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;

@Unremovable
Expand Down Expand Up @@ -59,8 +61,11 @@ void mineWithQodana(MineNextProject event) {
return;
}
logger.atInfo().log("Start mining with qodana");
Future<Message<ProjectResult>> request =
vertx.eventBus().request(ProjectSupplier.SERVICE_NAME, new GetProject(ANALYZER_NAME));
Future<Message<ProjectResult>> request = vertx.eventBus()
.request(
ProjectSupplier.SERVICE_NAME,
new GetProject(ANALYZER_NAME),
new DeliveryOptions().setSendTimeout(TimeUnit.MINUTES.toMillis(5)));
request.onSuccess(v -> {
if (v.body() instanceof ProjectResult.Success success) {
var qodanaResult = analyzeProject(success);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
import io.vertx.core.eventbus.DeliveryOptions;
import io.vertx.core.eventbus.Message;
import jakarta.enterprise.context.ApplicationScoped;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;

@Unremovable
Expand Down Expand Up @@ -58,8 +60,11 @@ void mineWithSpoon(MineNextProject event) {
return;
}
logger.atInfo().log("Start mining with spoon");
Future<Message<ProjectResult>> request =
vertx.eventBus().request(ProjectSupplier.SERVICE_NAME, new GetProject(ANALYZER_NAME));
Future<Message<ProjectResult>> request = vertx.eventBus()
.request(
ProjectSupplier.SERVICE_NAME,
new GetProject(ANALYZER_NAME),
new DeliveryOptions().setSendTimeout(TimeUnit.MINUTES.toMillis(5)));
request.onSuccess(v -> {
if (v.body() instanceof ProjectResult.Success success) {
var spoonResult = analyzeProjectWithSpoon(success);
Expand Down

0 comments on commit 3eb5c6e

Please sign in to comment.