mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
[dev] change threadpool name
This commit is contained in:
parent
7125e833e5
commit
923b3ce0d2
@ -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.OhMyConfig;
|
||||||
import com.github.kfcfans.powerjob.worker.common.constants.StoreStrategy;
|
import com.github.kfcfans.powerjob.worker.common.constants.StoreStrategy;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@ -17,6 +18,10 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class OhMySchedulerConfig {
|
public class OhMySchedulerConfig {
|
||||||
|
|
||||||
|
@Value("${powerjob.akka.port}")
|
||||||
|
private int port;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OhMyWorker initOMS() throws Exception {
|
public OhMyWorker initOMS() throws Exception {
|
||||||
|
|
||||||
@ -25,7 +30,7 @@ public class OhMySchedulerConfig {
|
|||||||
|
|
||||||
// 1. 创建配置文件
|
// 1. 创建配置文件
|
||||||
OhMyConfig config = new OhMyConfig();
|
OhMyConfig config = new OhMyConfig();
|
||||||
config.setPort(27777);
|
config.setPort(port);
|
||||||
config.setAppName("oms-test");
|
config.setAppName("oms-test");
|
||||||
config.setServerAddress(serverAddress);
|
config.setServerAddress(serverAddress);
|
||||||
// 如果没有大型 Map/MapReduce 的需求,建议使用内存来加速计算
|
// 如果没有大型 Map/MapReduce 的需求,建议使用内存来加速计算
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
server.port=8081
|
server.port=8081
|
||||||
|
|
||||||
spring.jpa.open-in-view=false
|
spring.jpa.open-in-view=false
|
||||||
|
|
||||||
|
powerjob.akka.port=27777
|
Loading…
x
Reference in New Issue
Block a user