mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Thread name and log cleanups
This commit is contained in:
@ -159,7 +159,8 @@ public class AsyncJobManager
|
|||||||
private <T extends Serializable> T runAsyncJob(String jobName, AsyncJob<T> asyncJob, UUIDAndTypeStateKey uuidAndTypeStateKey, AsyncJobStatus asyncJobStatus)
|
private <T extends Serializable> T runAsyncJob(String jobName, AsyncJob<T> asyncJob, UUIDAndTypeStateKey uuidAndTypeStateKey, AsyncJobStatus asyncJobStatus)
|
||||||
{
|
{
|
||||||
String originalThreadName = Thread.currentThread().getName();
|
String originalThreadName = Thread.currentThread().getName();
|
||||||
Thread.currentThread().setName("Job:" + jobName + ":" + uuidAndTypeStateKey.getUuid().toString().substring(0, 8));
|
// Thread.currentThread().setName("Job:" + jobName + ":" + uuidAndTypeStateKey.getUuid().toString().substring(0, 8));
|
||||||
|
Thread.currentThread().setName("Job:" + jobName);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LOG.debug("Starting job " + uuidAndTypeStateKey.getUuid());
|
LOG.debug("Starting job " + uuidAndTypeStateKey.getUuid());
|
||||||
|
@ -104,12 +104,12 @@ public class BaseStreamedETLStep
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
protected void moveReviewStepAfterValidateStep(RunBackendStepOutput runBackendStepOutput)
|
protected void moveReviewStepAfterValidateStep(RunBackendStepOutput runBackendStepOutput)
|
||||||
{
|
{
|
||||||
LOG.info("Skipping to validation step");
|
LOG.debug("Skipping to validation step");
|
||||||
ArrayList<String> stepList = new ArrayList<>(runBackendStepOutput.getProcessState().getStepList());
|
ArrayList<String> stepList = new ArrayList<>(runBackendStepOutput.getProcessState().getStepList());
|
||||||
LOG.debug("Step list pre: " + stepList);
|
LOG.trace("Step list pre: " + stepList);
|
||||||
stepList.removeIf(s -> s.equals(StreamedETLWithFrontendProcess.STEP_NAME_REVIEW));
|
stepList.removeIf(s -> s.equals(StreamedETLWithFrontendProcess.STEP_NAME_REVIEW));
|
||||||
stepList.add(stepList.indexOf(StreamedETLWithFrontendProcess.STEP_NAME_VALIDATE) + 1, StreamedETLWithFrontendProcess.STEP_NAME_REVIEW);
|
stepList.add(stepList.indexOf(StreamedETLWithFrontendProcess.STEP_NAME_VALIDATE) + 1, StreamedETLWithFrontendProcess.STEP_NAME_REVIEW);
|
||||||
runBackendStepOutput.getProcessState().setStepList(stepList);
|
runBackendStepOutput.getProcessState().setStepList(stepList);
|
||||||
LOG.debug("Step list post: " + stepList);
|
LOG.trace("Step list post: " + stepList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@ import com.kingsrook.qqq.backend.core.actions.reporting.RecordPipe;
|
|||||||
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
import com.kingsrook.qqq.backend.core.exceptions.QException;
|
||||||
import com.kingsrook.qqq.backend.core.logging.QLogger;
|
import com.kingsrook.qqq.backend.core.logging.QLogger;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.audits.AuditInput;
|
import com.kingsrook.qqq.backend.core.model.actions.audits.AuditInput;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.processes.ProcessSummaryLine;
|
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.processes.ProcessSummaryLineInterface;
|
import com.kingsrook.qqq.backend.core.model.actions.processes.ProcessSummaryLineInterface;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepInput;
|
import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepInput;
|
||||||
import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepOutput;
|
import com.kingsrook.qqq.backend.core.model.actions.processes.RunBackendStepOutput;
|
||||||
@ -128,7 +127,7 @@ public class StreamedETLExecuteStep extends BaseStreamedETLStep implements Backe
|
|||||||
asyncRecordPipeLoop.setMinRecordsToConsume(overrideRecordPipeCapacity);
|
asyncRecordPipeLoop.setMinRecordsToConsume(overrideRecordPipeCapacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
int recordCount = asyncRecordPipeLoop.run("StreamedETL>Execute>ExtractStep", null, recordPipe, (status) ->
|
int recordCount = asyncRecordPipeLoop.run("StreamedETLExecute>Extract>" + runBackendStepInput.getProcessName(), null, recordPipe, (status) ->
|
||||||
{
|
{
|
||||||
extractStep.run(runBackendStepInput, runBackendStepOutput);
|
extractStep.run(runBackendStepInput, runBackendStepOutput);
|
||||||
return (runBackendStepOutput);
|
return (runBackendStepOutput);
|
||||||
|
@ -125,7 +125,7 @@ public class StreamedETLPreviewStep extends BaseStreamedETLStep implements Backe
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
List<QRecord> previewRecordList = new ArrayList<>();
|
List<QRecord> previewRecordList = new ArrayList<>();
|
||||||
new AsyncRecordPipeLoop().run("StreamedETL>Preview>ExtractStep", PROCESS_OUTPUT_RECORD_LIST_LIMIT, recordPipe, (status) ->
|
new AsyncRecordPipeLoop().run("StreamedETLPreview>Extract>" + runBackendStepInput.getProcessName(), PROCESS_OUTPUT_RECORD_LIST_LIMIT, recordPipe, (status) ->
|
||||||
{
|
{
|
||||||
runBackendStepInput.setAsyncJobCallback(status);
|
runBackendStepInput.setAsyncJobCallback(status);
|
||||||
extractStep.run(runBackendStepInput, runBackendStepOutput);
|
extractStep.run(runBackendStepInput, runBackendStepOutput);
|
||||||
|
@ -91,7 +91,7 @@ public class StreamedETLValidateStep extends BaseStreamedETLStep implements Back
|
|||||||
transformStep.preRun(runBackendStepInput, runBackendStepOutput);
|
transformStep.preRun(runBackendStepInput, runBackendStepOutput);
|
||||||
|
|
||||||
List<QRecord> previewRecordList = new ArrayList<>();
|
List<QRecord> previewRecordList = new ArrayList<>();
|
||||||
int recordCount = new AsyncRecordPipeLoop().run("StreamedETL>Preview>ValidateStep", null, recordPipe, (status) ->
|
int recordCount = new AsyncRecordPipeLoop().run("StreamedETLValidate>Extract>" + runBackendStepInput.getProcessName(), null, recordPipe, (status) ->
|
||||||
{
|
{
|
||||||
extractStep.run(runBackendStepInput, runBackendStepOutput);
|
extractStep.run(runBackendStepInput, runBackendStepOutput);
|
||||||
return (runBackendStepOutput);
|
return (runBackendStepOutput);
|
||||||
|
Reference in New Issue
Block a user