示例#1
0
 @Override
 public Health health() {
   try {
     getSongDb();
     return Health.up().build();
   } catch (Exception e) {
     return Health.down(e).build();
   }
 }
示例#2
0
 @Override
 protected Health getHealth(BasicGitConfiguration config) {
   try {
     GitRepositoryClient client = repositoryClientFactory.getClient(config.getGitRepository());
     client.sync(logger::debug);
     return Health.up().build();
   } catch (Exception ex) {
     return Health.down(ex).build();
   }
 }
 @Override
 protected Health getHealth(GitLabConfiguration config) {
   try {
     // Gets the client
     OntrackGitLabClient client = gitLabClientFactory.create(config);
     // Gets the list of repositories
     client.getRepositories();
     // OK
     return Health.up().build();
   } catch (Exception ex) {
     return Health.down(ex).build();
   }
 }