Browse Source

Fix GitRepository.status command, Increased timeout between poll commands.

pull/6615/head
Andrii Shvaika 4 years ago
parent
commit
905b60da6a
  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:
- key: max.poll.records
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:
# - key: max.poll.records
# 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 {
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 {

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

@ -73,6 +73,9 @@ queue:
tb_ota_package:
- key: max.poll.records
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:
# - key: max.poll.records
# value: "${TB_QUEUE_KAFKA_SQ_MAX_POLL_RECORDS:1024}"

Loading…
Cancel
Save