mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: 添加 worker tag 配置
This commit is contained in:
parent
62d682fbd5
commit
e585ba5a19
@ -73,6 +73,10 @@ public class PowerJobAutoConfiguration {
|
||||
* Max length of appended workflow context . Appended workflow context value that is longer than the value will be ignore.
|
||||
*/
|
||||
config.setMaxAppendedWfContextLength(worker.getMaxAppendedWfContextLength());
|
||||
/*
|
||||
* Worker Tag
|
||||
*/
|
||||
config.setTag(worker.getTag());
|
||||
/*
|
||||
* Create OhMyWorker object and set properties.
|
||||
*/
|
||||
|
@ -90,6 +90,16 @@ public class PowerJobProperties {
|
||||
getWorker().setEnableTestMode(enableTestMode);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@DeprecatedConfigurationProperty(replacement = "powerjob.worker.tag")
|
||||
public String getTag() {
|
||||
return getWorker().tag;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setTag(String tag) {
|
||||
getWorker().setTag(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Powerjob worker configuration properties.
|
||||
@ -139,6 +149,9 @@ public class PowerJobProperties {
|
||||
* {@link WorkflowContext} max length for #appendedContextData
|
||||
*/
|
||||
private int maxAppendedWfContextLength = 8192;
|
||||
|
||||
/**
|
||||
* Worker Tag
|
||||
*/
|
||||
private String tag;
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,12 @@
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Max length of appended workflow context. Appended workflow context that is longer than the value will be ignore.",
|
||||
"sourceType": "tech.powerjob.worker.autoconfigure.PowerJobProperties$Worker"
|
||||
},
|
||||
{
|
||||
"name": "powerjob.worker.tag",
|
||||
"type": "java.lang.String",
|
||||
"description": "Worker Tag",
|
||||
"sourceType": "tech.powerjob.worker.autoconfigure.PowerJobProperties$Worker"
|
||||
}
|
||||
],
|
||||
"hints": []
|
||||
|
Loading…
x
Reference in New Issue
Block a user