|
|
|
@ -2,9 +2,10 @@ package com.xxl.job.solon;
|
|
|
|
|
|
|
|
|
|
import com.xxl.job.core.executor.XxlJobExecutor;
|
|
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
|
import com.xxl.job.solon.service.CloudJobServiceImpl;
|
|
|
|
|
import org.noear.solon.SolonApp;
|
|
|
|
|
import org.noear.solon.Utils;
|
|
|
|
|
import org.noear.solon.cloud.CloudManager;
|
|
|
|
|
import com.xxl.job.solon.service.CloudJobServiceImpl;
|
|
|
|
|
import org.noear.solon.core.Aop;
|
|
|
|
|
import org.noear.solon.core.Plugin;
|
|
|
|
|
|
|
|
|
@ -15,10 +16,11 @@ import org.noear.solon.core.Plugin;
|
|
|
|
|
public class XPluginImp implements Plugin {
|
|
|
|
|
@Override
|
|
|
|
|
public void start(SolonApp app) {
|
|
|
|
|
if (XxljobProps.instance.getJobEnable() == false) {
|
|
|
|
|
if (Utils.isEmpty(XxlJobProps.instance.getServer())) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (XxlJobProps.instance.getJobEnable()) {
|
|
|
|
|
//注册Job服务
|
|
|
|
|
CloudManager.register(CloudJobServiceImpl.instance);
|
|
|
|
|
|
|
|
|
@ -37,4 +39,5 @@ public class XPluginImp implements Plugin {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|