You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/06/28 10:06:15 UTC

[GitHub] [fineract] taskain7 opened a new pull request, #2385: New Instance type: Batch Manager

taskain7 opened a new pull request, #2385:
URL: https://github.com/apache/fineract/pull/2385

   ## Description
   
   A new instance type has been added: `Batch Manager`
   Existing instance type `Batch` has been renamed to `Batch Worker` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [fineract] galovics merged pull request #2385: New Instance type: Batch Manager

Posted by GitBox <gi...@apache.org>.
galovics merged PR #2385:
URL: https://github.com/apache/fineract/pull/2385


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [fineract] galovics commented on a diff in pull request #2385: New Instance type: Batch Manager

Posted by GitBox <gi...@apache.org>.
galovics commented on code in PR #2385:
URL: https://github.com/apache/fineract/pull/2385#discussion_r908323256


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java:
##########
@@ -98,7 +98,7 @@ public class JobRegisterServiceImpl implements JobRegisterService, ApplicationLi
     @PostConstruct
     public void loadAllJobs() {
         // If the instance is not Batch Enabled will not load the Jobs
-        if (!fineractProperties.getMode().isBatchEnabled()) {
+        if (!(fineractProperties.getMode().isBatchWorkerEnabled() || fineractProperties.getMode().isBatchManagerEnabled())) {

Review Comment:
   Only the batch manager here too.



##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java:
##########
@@ -133,7 +133,7 @@ public Response executeJob(@PathParam(SchedulerJobApiConstants.JOB_ID) @Paramete
             @QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam) {
         // check the logged in user have permissions to execute scheduler jobs
         Response response;
-        if (fineractProperties.getMode().isBatchEnabled()) {
+        if (fineractProperties.getMode().isBatchWorkerEnabled() || fineractProperties.getMode().isBatchManagerEnabled()) {

Review Comment:
   Only the batch manager, not the workers.



##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/filter/FineractInstanceModeApiFilter.java:
##########
@@ -44,7 +44,7 @@
 public class FineractInstanceModeApiFilter extends OncePerRequestFilter {
 
     private static final List<ExceptionListItem> EXCEPTION_LIST = List.of(
-            item(FineractProperties.FineractModeProperties::isBatchEnabled, pi -> pi.startsWith("/jobs")),
+            item(FineractProperties.FineractModeProperties::isBatchWorkerEnabled, pi -> pi.startsWith("/jobs")),

Review Comment:
   Only the batch manager should allow the /jobs APIs, not the workers. :-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org