mirror of
https://github.com/google/nomulus.git
synced 2025-05-17 17:59:41 +02:00
Let RegistryTool proceed if MetricWriter is unavailable
This may happen with automated runs off Google Cloud. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213462175
This commit is contained in:
parent
b54b1ea9e4
commit
1f80f58336
1 changed files with 6 additions and 1 deletions
|
@ -234,7 +234,12 @@ final class RegistryCli implements AutoCloseable, CommandRunner {
|
||||||
private void runCommand(Command command) throws Exception {
|
private void runCommand(Command command) throws Exception {
|
||||||
injectReflectively(RegistryToolComponent.class, component, command);
|
injectReflectively(RegistryToolComponent.class, component, command);
|
||||||
if (metricWriter == null && uploadMetrics) {
|
if (metricWriter == null && uploadMetrics) {
|
||||||
|
try {
|
||||||
metricWriter = component.metricWriter();
|
metricWriter = component.metricWriter();
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.format("Failed to get metricWriter. Got error:\n%s\n\n", e);
|
||||||
|
uploadMetrics = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command instanceof CommandWithConnection) {
|
if (command instanceof CommandWithConnection) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue