Browse Source

Merge branch 'feature/entities-version-control' of github.com:thingsboard/thingsboard into feature/entities-version-control

pull/6615/head
Igor Kulikov 4 years ago
parent
commit
65ce80e383
  1. 3
      application/src/main/resources/thingsboard.yml
  2. 5
      common/version-control/src/main/java/org/thingsboard/server/service/sync/vc/GitRepository.java
  3. 3
      msa/vc-executor/src/main/resources/tb-vc-executor.yml

3
application/src/main/resources/thingsboard.yml

@ -931,6 +931,9 @@ queue:
tb_ota_package: tb_ota_package:
- key: max.poll.records - key: max.poll.records
value: "${TB_QUEUE_KAFKA_OTA_MAX_POLL_RECORDS:10}" value: "${TB_QUEUE_KAFKA_OTA_MAX_POLL_RECORDS:10}"
tb_version_control:
- key: max.poll.interval.ms
value: "${TB_QUEUE_KAFKA_VC_MAX_POLL_INTERVAL_MS:600000}"
# tb_rule_engine.sq: # tb_rule_engine.sq:
# - key: max.poll.records # - key: max.poll.records
# value: "${TB_QUEUE_KAFKA_SQ_MAX_POLL_RECORDS:1024}" # value: "${TB_QUEUE_KAFKA_SQ_MAX_POLL_RECORDS:1024}"

5
common/version-control/src/main/java/org/thingsboard/server/service/sync/vc/GitRepository.java

@ -241,7 +241,10 @@ public class GitRepository {
public Status status() throws GitAPIException { public Status status() throws GitAPIException {
org.eclipse.jgit.api.Status status = execute(git.status()); org.eclipse.jgit.api.Status status = execute(git.status());
return new Status(status.getAdded(), status.getModified(), status.getRemoved()); Set<String> modified = new HashSet<>();
modified.addAll(status.getModified());
modified.addAll(status.getChanged());
return new Status(status.getAdded(), modified, status.getRemoved());
} }
public Commit commit(String message) throws GitAPIException { public Commit commit(String message) throws GitAPIException {

3
msa/vc-executor/src/main/resources/tb-vc-executor.yml

@ -73,6 +73,9 @@ queue:
tb_ota_package: tb_ota_package:
- key: max.poll.records - key: max.poll.records
value: "${TB_QUEUE_KAFKA_OTA_MAX_POLL_RECORDS:10}" value: "${TB_QUEUE_KAFKA_OTA_MAX_POLL_RECORDS:10}"
tb_version_control:
- key: max.poll.interval.ms
value: "${TB_QUEUE_KAFKA_VC_MAX_POLL_INTERVAL_MS:600000}"
# tb_rule_engine.sq: # tb_rule_engine.sq:
# - key: max.poll.records # - key: max.poll.records
# value: "${TB_QUEUE_KAFKA_SQ_MAX_POLL_RECORDS:1024}" # value: "${TB_QUEUE_KAFKA_SQ_MAX_POLL_RECORDS:1024}"

Loading…
Cancel
Save