Fail immediately when project metadata cannot be updated.
Remove loop that puts additional pressure on target system. Closes: #49
This commit is contained in:
committed by
Mark Paluch
parent
1cd87fb062
commit
6c03f247e8
@@ -89,21 +89,8 @@ class ProjectServiceOperations {
|
||||
|
||||
// Sometimes we see 404 Not Found: [no body], sometimes
|
||||
// 400 Bad Request: "Release '2.2.13-SNAPSHOT' already present
|
||||
RuntimeException rethrow = null;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
||||
try {
|
||||
client.updateProjectMetadata(entry.getKey(), entry.getValue());
|
||||
return;
|
||||
} catch (RuntimeException e) {
|
||||
rethrow = e;
|
||||
logger.warn(entry.getKey(), e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
if (rethrow != null) {
|
||||
throw rethrow;
|
||||
}
|
||||
// still we should fail here and report those failures to the website team
|
||||
client.updateProjectMetadata(entry.getKey(), entry.getValue());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user