[dev] change threadpool name

This commit is contained in:
tjq 2020-06-14 22:41:01 +08:00
parent 7125e833e5
commit 923b3ce0d2
2 changed files with 9 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import com.github.kfcfans.powerjob.worker.OhMyWorker;
import com.github.kfcfans.powerjob.worker.common.OhMyConfig;
import com.github.kfcfans.powerjob.worker.common.constants.StoreStrategy;
import com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -17,6 +18,10 @@ import java.util.List;
*/
@Configuration
public class OhMySchedulerConfig {
@Value("${powerjob.akka.port}")
private int port;
@Bean
public OhMyWorker initOMS() throws Exception {
@ -25,7 +30,7 @@ public class OhMySchedulerConfig {
// 1. 创建配置文件
OhMyConfig config = new OhMyConfig();
config.setPort(27777);
config.setPort(port);
config.setAppName("oms-test");
config.setServerAddress(serverAddress);
// 如果没有大型 Map/MapReduce 的需求建议使用内存来加速计算

View File

@ -1,3 +1,5 @@
server.port=8081
spring.jpa.open-in-view=false
spring.jpa.open-in-view=false
powerjob.akka.port=27777