Skip to content

Commit

Permalink
UI优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xueli.xue committed May 19, 2016
1 parent 510b397 commit a368c70
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 16 additions & 1 deletion xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/index.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,35 @@
<textarea id="demoCode" style="display:none;" >
package com.xxl.job.service.handler;

import java.util.concurrent.TimeUnit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.xxl.job.client.handler.IJobHandler;
import com.xxl.job.client.handler.IJobHandler.JobHandleStatus;
import com.xxl.job.client.handler.annotation.JobHander;

public class DemoJobHandler extends IJobHandler {
private static transient Logger logger = LoggerFactory.getLogger(DemoJobHandler.class);

@Override
public JobHandleStatus handle(String... params) throws Exception {
logger.info("demo run success...");
for (int i = 0; i < 5; i++) {
TimeUnit.SECONDS.sleep(1);
logger.info("handler run:{}", i);
}
return JobHandleStatus.SUCCESS;
}

public static void main(String[] args) {
System.out.println(DemoJobHandler.class.getName());
System.out.println(DemoJobHandler.class);
}

}

</textarea>

<@netCommon.comAlert />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void regist(String handleName, IJobHandler handler){

// handler push to queue
public static String service(Map<String, String> _param) {
logger.info(">>>>>>>>>>> xxl-job service start, _param:{}", new Object[]{_param});
logger.debug(">>>>>>>>>>> xxl-job service start, _param:{}", new Object[]{_param});

// callback
RemoteCallBack callback = new RemoteCallBack();
Expand Down Expand Up @@ -152,7 +152,7 @@ public static String service(Map<String, String> _param) {
return JacksonUtil.writeValueAsString(callback);
}

logger.info(">>>>>>>>>>> xxl-job service end, triggerData:{}");
logger.debug(">>>>>>>>>>> xxl-job service end, triggerData:{}");
return JacksonUtil.writeValueAsString(callback);
}

Expand Down

0 comments on commit a368c70

Please sign in to comment.