Skip to content

Commit

Permalink
日志回调服务
Browse files Browse the repository at this point in the history
  • Loading branch information
xueli.xue committed May 28, 2016
1 parent 87060f4 commit 3420b1b
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,21 +204,24 @@ public static String service(Map<String, String> _param) {
new Thread(new Runnable() {
@Override
public void run() {
try {
HashMap<String, String> item = callBackQueue.poll();
if (item != null) {
RemoteCallBack callback = null;
try {
callback = HttpUtil.post(item.get("_address"), item);
} catch (Exception e) {
logger.info("HandlerThread Exception:", e);
}
logger.info(">>>>>>>>>>> xxl-job callback , params:{}, result:{}", new Object[]{item, callback});
}
} catch (Exception e) {
while(true){
try {
HashMap<String, String> item = callBackQueue.poll();
if (item != null) {
RemoteCallBack callback = null;
try {
callback = HttpUtil.post(item.get("_address"), item);
} catch (Exception e) {
logger.info("HandlerThread Exception:", e);
}
logger.info(">>>>>>>>>>> xxl-job callback , params:{}, result:{}", new Object[]{item, callback});
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
});
}).start();
}
public static void pushCallBack(String address, HashMap<String, String> params){
params.put("_address", address);
Expand Down

0 comments on commit 3420b1b

Please sign in to comment.