Skip to content

Commit

Permalink
More logs (#7185)
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro authored Jan 16, 2025
1 parent 4cd9e4c commit da82aa5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public <T> T get(String url, String userAgent, Class<T> type) {
* @return boolean indicator of success
*/
public boolean downloadFile(String url, String userAgent, String localFilePath) {
LOGGER.info("About to download file {}", url);
JerseyClientResponse<InputStream, String> response = jerseyClientHelperForOrgLoaders.executeGetRequest(url, null, null, false, Map.of(), Map.of("User-Agent", userAgent), InputStream.class, String.class);
int status = response.getStatus();
if (status != 200) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class OrgLoadManagerImpl implements OrgLoadManager {

@Override
public void loadOrgs() {
LOGGER.info("About to start the orgs loader process");
OrgLoadSource loader = getNextOrgLoader();
if (loader != null) {
loadOrg(loader);
Expand All @@ -46,6 +47,7 @@ public void loadOrgs() {

@Override
public void loadOrg(OrgLoadSource loader) {
LOGGER.info("About to start loading orgs from source {}", loader.getSourceName());
if (loader != null) {
OrgImportLogEntity importLog = getOrgImportLogEntity(loader);
boolean success = loader.downloadOrgData();
Expand All @@ -55,8 +57,10 @@ public void loadOrg(OrgLoadSource loader) {
logImport(importLog, success);

if (success) {
LOGGER.info("Orgs successfully imported from {}", loader.getSourceName());
slackManager.sendAlert(String.format("Orgs successfully imported from %s", loader.getSourceName()), slackChannel, slackUser);
} else {
LOGGER.warn("Org import FAILURE from {}", loader.getSourceName());
slackManager.sendAlert(String.format("Org import FAILURE from %s", loader.getSourceName()), slackChannel, slackUser);
}
} else {
Expand Down

0 comments on commit da82aa5

Please sign in to comment.