Skip to content

Commit

Permalink
Merge pull request #556 from hiddenalpha/ApplyFindings-20240130
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenalpha authored Jan 31, 2024
2 parents 7a1d526 + a37e29f commit 0483480
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,17 @@ private void trigger() {

ExpiryCheckHandler.updateServerTimestampHeader(request);

vertx.eventBus().request(redisquesAddress, buildEnqueueOperation("scheduler-" + name, request.toJsonObject().put(QueueClient.QUEUE_TIMESTAMP, System.currentTimeMillis()).encode()),
(Handler<AsyncResult<Message<JsonObject>>>) event -> {
if (!OK.equals(event.result().body().getString(STATUS))) {
log.error("Could not enqueue request {}", request.toJsonObject().encodePrettily());
}
});
String queueName = "scheduler-" + name;
JsonObject enqueOp = buildEnqueueOperation(queueName, request.toJsonObject().put(QueueClient.QUEUE_TIMESTAMP, System.currentTimeMillis()).encode());
vertx.eventBus().request(redisquesAddress, enqueOp, (Handler<AsyncResult<Message<JsonObject>>>) event -> {
if (event.failed()) {
if (log.isWarnEnabled()) log.warn("Could not enqueue request '{}' '{}'", queueName, request.getUri(), new Exception(event.cause()));
return;
}
if (!OK.equals(event.result().body().getString(STATUS))) {
log.error("Could not enqueue request {}", request.toJsonObject().encodePrettily());
}
});
}
}

Expand Down

0 comments on commit 0483480

Please sign in to comment.