| 87 | } |
| 88 | |
| 89 | private PushResult push2Target(String url, String pushContent) { |
| 90 | try { |
| 91 | JsonObject jsonObject = retryer.call(() -> post(url, pushContent)); |
| 92 | log.info("推送结果:{}", jsonObject.toString()); |
| 93 | return PushResult.success(); |
| 94 | } catch (RetryException e) { |
| 95 | log.error("重试最终失败:{}", this.getClass().getSimpleName(), e); |
| 96 | } catch (ExecutionException e) { |
| 97 | log.error("重试中断:{}", this.getClass().getSimpleName(), e); |
| 98 | } |
| 99 | return PushResult.failed(); |
| 100 | } |
| 101 | |
| 102 | private JsonObject post(String url, String content) { |
| 103 | return HttpUtils.doPost(url, content, null, requestConfig); |