From 68942f0bed85405a0e2b8d250bda8c3c73c2aec8 Mon Sep 17 00:00:00 2001 From: valentinogiardino Date: Thu, 21 Nov 2024 23:58:52 -0300 Subject: [PATCH] #30669 add log --- .../dotcms/rest/api/v1/JobQueueManagerHelper.java | 1 + .../api/v1/contentImport/ContentImportResource.java | 12 +++--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/dotCMS/src/main/java/com/dotcms/rest/api/v1/JobQueueManagerHelper.java b/dotCMS/src/main/java/com/dotcms/rest/api/v1/JobQueueManagerHelper.java index db7e60ff94eb..77e9c6acb09f 100644 --- a/dotCMS/src/main/java/com/dotcms/rest/api/v1/JobQueueManagerHelper.java +++ b/dotCMS/src/main/java/com/dotcms/rest/api/v1/JobQueueManagerHelper.java @@ -60,6 +60,7 @@ public void registerProcessors() { if (!testInstantiation(processor)) { return; } + Logger.info(this.getClass(), "Registering JobProcessor: " + processor.getName()); registerProcessor(processor); } catch (Exception e) { Logger.error(this.getClass(), "Unable to register JobProcessor ", e); diff --git a/dotCMS/src/main/java/com/dotcms/rest/api/v1/contentImport/ContentImportResource.java b/dotCMS/src/main/java/com/dotcms/rest/api/v1/contentImport/ContentImportResource.java index 707ba47ed522..b824016839bd 100644 --- a/dotCMS/src/main/java/com/dotcms/rest/api/v1/contentImport/ContentImportResource.java +++ b/dotCMS/src/main/java/com/dotcms/rest/api/v1/contentImport/ContentImportResource.java @@ -20,7 +20,6 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import static com.dotcms.util.DotPreconditions.checkNotNull; /** * REST resource for handling content import operations, including creating and enqueuing content import jobs. @@ -31,12 +30,9 @@ public class ContentImportResource { private final WebResource webResource; private final ContentImportHelper importHelper; - private final String IMPORT_QUEUE_NAME = "importContentlets"; - - //TODO move to a common place - + private static final String IMPORT_QUEUE_NAME = "importContentlets"; + // Constants for commands - private static final String CMD_PREVIEW = "preview"; private static final String CMD_PUBLISH = "publish"; /** @@ -113,7 +109,6 @@ public Response importContent( @BeanParam final ContentImportParams params) throws DotDataException, JsonProcessingException { - checkNotNull(params, "Form data is required"); // Initialize the WebResource and set required user information final var initDataObject = new WebResource.InitBuilder(webResource) .requiredBackendUser(true) @@ -122,8 +117,7 @@ public Response importContent( .rejectWhenNoUser(true) .init(); - Logger.debug(this, ()->String.format("Importing content: %s", params)); - + Logger.debug(this, ()->String.format(" user %s is importing content: %s", initDataObject.getUser().getUserId(), params)); try { // Create the import job