|
10 | 10 | import java.util.List;
|
11 | 11 |
|
12 | 12 | /**
|
13 |
| - * Worker 配置文件 |
| 13 | + * The powerjob-worker's configuration |
14 | 14 | *
|
15 | 15 | * @author tjq
|
16 | 16 | * @since 2020/3/16
|
|
19 | 19 | @Setter
|
20 | 20 | public class OhMyConfig {
|
21 | 21 | /**
|
22 |
| - * 应用名称 |
| 22 | + * AppName, recommend to use the name of this project |
| 23 | + * Applications should be registered by powerjob-console in advance to prevent error. |
23 | 24 | */
|
24 | 25 | private String appName;
|
25 | 26 | /**
|
26 |
| - * 启动端口 |
| 27 | + * Worker port |
| 28 | + * Random port is enabled when port is set with non-positive number. |
27 | 29 | */
|
28 | 30 | private int port = RemoteConstant.DEFAULT_WORKER_PORT;
|
29 | 31 | /**
|
30 |
| - * 调度服务器地址,ip:port 或 域名 |
| 32 | + * Address of powerjob-server node(s) |
| 33 | + * Do not mistake for ActorSystem port. Do not add any prefix, i.e. http://. |
31 | 34 | */
|
32 | 35 | private List<String> serverAddress = Lists.newArrayList();
|
33 | 36 | /**
|
34 |
| - * 本地持久化方式,默认使用磁盘 |
35 |
| - */ |
36 |
| - private StoreStrategy storeStrategy = StoreStrategy.DISK; |
37 |
| - /** |
38 |
| - * 最大返回值长度,超过会被截断 |
39 |
| - * {@link ProcessResult}#msg 的最大长度 |
| 37 | + * Max length of response result. Result that is longer than the value will be truncated. |
| 38 | + * {@link ProcessResult} max length for #msg |
40 | 39 | */
|
41 | 40 | private int maxResultLength = 8096;
|
42 | 41 | /**
|
43 |
| - * 用户自定义上下文对象,该值会被透传到 TaskContext#userContext 属性 |
44 |
| - * 使用场景:容器脚本Java处理器需要使用oms-worker宿主应用的Spring Bean,可在此处传入 ApplicationContext,在Processor中获取 bean |
| 42 | + * User-defined context object, which is passed through to the TaskContext#userContext property |
| 43 | + * Usage Scenarios: The container Java processor needs to use the Spring bean of the host application, where you can pass in the ApplicationContext and get the bean in the Processor |
45 | 44 | */
|
46 | 45 | private Object userContext;
|
47 | 46 | /**
|
48 |
| - * 启动测试模式,true情况下,不再尝试连接 server 并验证appName |
49 |
| - * true -> 用于本地写单元测试调试; false -> 默认值,标准模式 |
| 47 | + * Internal persistence method, DISK or MEMORY |
| 48 | + * Normally you don't need to care about this configuration |
| 49 | + */ |
| 50 | + private StoreStrategy storeStrategy = StoreStrategy.DISK; |
| 51 | + /** |
| 52 | + * If test mode is set as true, Powerjob-worker no longer connects to the server or validates appName. |
| 53 | + * Test mode is used for conditions that your have no powerjob-server in your develop env so you can't startup the application |
50 | 54 | */
|
51 | 55 | private boolean enableTestMode = false;
|
52 | 56 | }
|
0 commit comments