Skip to content

Commit

Permalink
code cleanup in progress monitor
Browse files Browse the repository at this point in the history
- remove unused methods and fields
- fix message typos
  • Loading branch information
ashitsalesforce committed Jan 20, 2024
1 parent 88ff207 commit 5a2401b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public class NihilistProgressAdapter implements ILoaderProgress {
private int numRowsWithError = 0;
private int numberBatchesTotal = 0;
private final Logger logger = LogManager.getLogger(getClass());
private String taskName;
private int workDone;
private int totalWork;
private final List<String> subTasksInOrder = new ArrayList<String>();
Expand All @@ -60,7 +59,6 @@ public NihilistProgressAdapter() {
}

public void beginTask(String name, int totalWork) {
this.taskName = name;
this.totalWork = totalWork;
}

Expand All @@ -80,18 +78,10 @@ public void worked(int worked) {
this.workDone += worked;
}

public void setTaskName(String name) {
this.taskName = name;
}

public void setSubTask(String name) {
this.subTasksInOrder.add(name);
logger.info(name);
}

public String getTaskName() {
return this.taskName;
}

public int getTotalWork() {
return this.totalWork;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,6 @@ public void worked(int worked) {
monitor.worked(worked);
}

/*
* (non-Javadoc)
*
* @see com.sfdc.action.progress.ILoaderProgress#setTaskName(java.lang.String)
*/
public void setTaskName(String name) {
super.setTaskName(name);
monitor.setTaskName(name);
}

/*
* (non-Javadoc)
*
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Process.aboutPerform=About to perform: {0}
Process.missingRequiredArg=Missing required argument: {0}
Action.loading=Loading: {0}
Action.logCanceled=Load was canceled.
Action.exception=Exception occured during loading
Action.exception=Exception occurred during loading
Action.logSuccess=Load completed successfully.
Action.success=The operation has fully completed. There were {0} successful {1}s and {2} errors.
AbstractExtractAction.success=The operation has fully completed. There were {0} successful extractions and {2} errors.
Action.cancel=The operation was cancelled. There were {0} successful {1}s and {2} errors.
Action.error=Load finished with an error. Please check the log.
Action.errorDaoStartRow=Can't read from dao when calulating start row
Action.errorDaoStartRow=Can't read from DAO when calculating start row
Action.errorLastRun=Can't save last run info
RowToStartUtil.errorDaoStartRow=Can't read from dao when calculating start row
RowToStartUtil.errorDaoStartRow=Can't read from DAO when calculating start row
RowToStartUtil.errorLastRun=Can't save last run info
Action.errorOpeningErrorFile=Error opening error status file: {0}
Action.errorOpeningSuccessFile=Error opening success status file: {0}
Expand Down

0 comments on commit 5a2401b

Please sign in to comment.