mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: output vertx request error
This commit is contained in:
parent
dd32916637
commit
570ea0487b
@ -10,6 +10,8 @@ import io.vertx.core.http.HttpClientResponse;
|
|||||||
import io.vertx.core.http.HttpMethod;
|
import io.vertx.core.http.HttpMethod;
|
||||||
import io.vertx.core.http.RequestOptions;
|
import io.vertx.core.http.RequestOptions;
|
||||||
import io.vertx.core.json.JsonObject;
|
import io.vertx.core.json.JsonObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import tech.powerjob.common.PowerSerializable;
|
import tech.powerjob.common.PowerSerializable;
|
||||||
import tech.powerjob.remote.framework.base.RemotingException;
|
import tech.powerjob.remote.framework.base.RemotingException;
|
||||||
import tech.powerjob.remote.framework.base.URL;
|
import tech.powerjob.remote.framework.base.URL;
|
||||||
@ -25,6 +27,7 @@ import java.util.concurrent.CompletionStage;
|
|||||||
* @author tjq
|
* @author tjq
|
||||||
* @since 2023/1/1
|
* @since 2023/1/1
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class VertxTransporter implements Transporter {
|
public class VertxTransporter implements Transporter {
|
||||||
|
|
||||||
private final HttpClient httpClient;
|
private final HttpClient httpClient;
|
||||||
@ -90,6 +93,8 @@ public class VertxTransporter implements Transporter {
|
|||||||
|
|
||||||
return Future.succeededFuture(x.toJsonObject().mapTo(clz));
|
return Future.succeededFuture(x.toJsonObject().mapTo(clz));
|
||||||
});
|
});
|
||||||
}).toCompletionStage();
|
})
|
||||||
|
.onFailure(t -> log.warn("[VertxTransporter] post to url[{}] failed,msg: {}", url, ExceptionUtils.getMessage(t)))
|
||||||
|
.toCompletionStage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@ FROM adoptopenjdk:8-jdk-hotspot
|
|||||||
# 维护者
|
# 维护者
|
||||||
MAINTAINER tengjiqi@gmail.com
|
MAINTAINER tengjiqi@gmail.com
|
||||||
# 下载并安装 maven
|
# 下载并安装 maven
|
||||||
RUN curl -O https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz
|
RUN curl -O https://mirrors.aliyun.com/apache/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz
|
||||||
RUN tar -zxvf apache-maven-3.9.2-bin.tar.gz && mv apache-maven-3.9.2 /opt/powerjob-maven && rm -rf apache-maven-3.9.2-bin.tar.gz
|
RUN tar -zxvf apache-maven-3.9.4-bin.tar.gz && mv apache-maven-3.9.4 /opt/powerjob-maven && rm -rf apache-maven-3.9.4-bin.tar.gz
|
||||||
# 替换 maven 配置文件
|
# 替换 maven 配置文件
|
||||||
RUN rm -rf /opt/powerjob-maven/conf/settings.xml
|
RUN rm -rf /opt/powerjob-maven/conf/settings.xml
|
||||||
COPY settings.xml /opt/powerjob-maven/conf/settings.xml
|
COPY settings.xml /opt/powerjob-maven/conf/settings.xml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user