fix #1304 add Config Reloader
This commit is contained in:
parent
f98f7fc8c6
commit
8c1389b2e1
4 changed files with 18 additions and 1 deletions
|
@ -51,6 +51,10 @@ public class LabelTypeHelper {
|
|||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
update();
|
||||
}
|
||||
|
||||
public void update() {
|
||||
final List<LabelType> labelTypeList = ComponentUtil.getComponent(LabelTypeService.class).getLabelTypeList();
|
||||
buildLabelTypeItems(labelTypeList);
|
||||
}
|
||||
|
|
|
@ -43,6 +43,10 @@ public class PathMappingHelper {
|
|||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
update();
|
||||
}
|
||||
|
||||
public void update() {
|
||||
final List<String> ptList = new ArrayList<>();
|
||||
ptList.add(Constants.PROCESS_TYPE_DISPLAYING);
|
||||
ptList.add(Constants.PROCESS_TYPE_BOTH);
|
||||
|
|
|
@ -355,6 +355,13 @@ public class SystemHelper {
|
|||
ComponentUtil.getRelatedQueryHelper().update();
|
||||
}
|
||||
|
||||
public void updateConfiguration() {
|
||||
ComponentUtil.getLabelTypeHelper().update();
|
||||
ComponentUtil.getPathMappingHelper().update();
|
||||
ComponentUtil.getRelatedContentHelper().update();
|
||||
ComponentUtil.getRelatedQueryHelper().update();
|
||||
}
|
||||
|
||||
public String generateAccessToken() {
|
||||
return RandomStringUtils.random(ComponentUtil.getFessConfig().getApiAccessTokenLengthAsInteger().intValue(), 0, 0, true, true,
|
||||
null, random);
|
||||
|
|
|
@ -12,5 +12,7 @@
|
|||
{"name":"Thumbnail Generator","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"generateThumbnailJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":6,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
|
||||
{"index":{"_index":".fess_config","_type":"scheduled_job","_id":"thumbnail_purger"}}
|
||||
{"name":"Thumbnail Purger","target":"all","cronExpression":"0 0 * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"purgeThumbnailJob\").expiry(30 * 24 * 60 * 60 * 1000L).execute();","jobLogging":true,"crawler":false,"available":true,"sortOrder":7,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
|
||||
{"index":{"_index":".fess_config","_type":"scheduled_job","_id":"reload_config"}}
|
||||
{"name":"Config Reloader","target":"all","cronExpression":"*/10 * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"systemHelper\").updateConfiguration();","jobLogging":false,"crawler":false,"available":true,"sortOrder":8,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
|
||||
{"index":{"_index":".fess_config","_type":"scheduled_job","_id":"ping_es"}}
|
||||
{"name":"Ping Elasticsearch","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"pingEsJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":8,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
|
||||
{"name":"Ping Elasticsearch","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"pingEsJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":9,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
|
||||
|
|
Loading…
Add table
Reference in a new issue