提交 3420b1bd 编写于 作者: X xueli.xue

日志回调服务

上级 87060f42
...@@ -204,21 +204,24 @@ public class HandlerRepository { ...@@ -204,21 +204,24 @@ public class HandlerRepository {
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
try { while(true){
HashMap<String, String> item = callBackQueue.poll(); try {
if (item != null) { HashMap<String, String> item = callBackQueue.poll();
RemoteCallBack callback = null; if (item != null) {
try { RemoteCallBack callback = null;
callback = HttpUtil.post(item.get("_address"), item); try {
} catch (Exception e) { callback = HttpUtil.post(item.get("_address"), item);
logger.info("HandlerThread Exception:", e); } catch (Exception e) {
} logger.info("HandlerThread Exception:", e);
logger.info(">>>>>>>>>>> xxl-job callback , params:{}, result:{}", new Object[]{item, callback}); }
} logger.info(">>>>>>>>>>> xxl-job callback , params:{}, result:{}", new Object[]{item, callback});
} catch (Exception e) { }
} catch (Exception e) {
e.printStackTrace();
}
} }
} }
}); }).start();
} }
public static void pushCallBack(String address, HashMap<String, String> params){ public static void pushCallBack(String address, HashMap<String, String> params){
params.put("_address", address); params.put("_address", address);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册