|
|
@ -1,5 +1,13 @@
|
|
|
|
package com.xxl.job.core.handler;
|
|
|
|
package com.xxl.job.core.handler;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.xxl.job.core.handler.HandlerRepository.HandlerParamEnum;
|
|
|
|
|
|
|
|
import com.xxl.job.core.handler.IJobHandler.JobHandleStatus;
|
|
|
|
|
|
|
|
import com.xxl.job.core.log.XxlJobFileAppender;
|
|
|
|
|
|
|
|
import com.xxl.job.core.util.HttpUtil;
|
|
|
|
|
|
|
|
import org.eclipse.jetty.util.ConcurrentHashSet;
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.PrintWriter;
|
|
|
|
import java.io.PrintWriter;
|
|
|
|
import java.io.StringWriter;
|
|
|
|
import java.io.StringWriter;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
@ -7,15 +15,6 @@ import java.util.Map;
|
|
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
|
|
import org.eclipse.jetty.util.ConcurrentHashSet;
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.xxl.job.core.handler.HandlerRepository.HandlerParamEnum;
|
|
|
|
|
|
|
|
import com.xxl.job.core.handler.IJobHandler.JobHandleStatus;
|
|
|
|
|
|
|
|
import com.xxl.job.core.log.XxlJobFileAppender;
|
|
|
|
|
|
|
|
import com.xxl.job.core.util.HttpUtil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* handler thread
|
|
|
|
* handler thread
|
|
|
|
* @author xuxueli 2016-1-16 19:52:47
|
|
|
|
* @author xuxueli 2016-1-16 19:52:47
|
|
|
@ -57,7 +56,7 @@ public class HandlerThread extends Thread{
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
|
while(!toStop){
|
|
|
|
while(!toStop){
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Map<String, String> handlerData = handlerDataQueue.poll();
|
|
|
|
Map<String, String> handlerData = handlerDataQueue.poll(3L ,TimeUnit.SECONDS);
|
|
|
|
if (handlerData!=null) {
|
|
|
|
if (handlerData!=null) {
|
|
|
|
i= 0;
|
|
|
|
i= 0;
|
|
|
|
String log_address = handlerData.get(HandlerParamEnum.LOG_ADDRESS.name());
|
|
|
|
String log_address = handlerData.get(HandlerParamEnum.LOG_ADDRESS.name());
|
|
|
|