Skip to content

Commit

Permalink
MOSIP-29747-api-make-the-audit-calls-inoked-within-resident-service-a…
Browse files Browse the repository at this point in the history
…p-is-as-async-call-for-better-performance (#1142)

* fixed additional comma issue

Signed-off-by: Ritik Jain <[email protected]>

* fixed error code

Signed-off-by: Ritik Jain <[email protected]>

* updated event enums

Signed-off-by: Ritik Jain <[email protected]>

* updated event enums

Signed-off-by: Ritik Jain <[email protected]>

* updated event enums

Signed-off-by: Ritik Jain <[email protected]>

* updated event enums

Signed-off-by: Ritik Jain <[email protected]>

* removed un necessary file

Signed-off-by: Ritik Jain <[email protected]>

* added async call for audits

Signed-off-by: Ritik Jain <[email protected]>

* updated method names

Signed-off-by: Ritik Jain <[email protected]>

* updated variable names

Signed-off-by: Ritik Jain <[email protected]>

* updated variable names

Signed-off-by: Ritik Jain <[email protected]>

* added default value

Signed-off-by: Ritik Jain <[email protected]>

* added separate value

Signed-off-by: Ritik Jain <[email protected]>

* updated property key

Signed-off-by: Ritik Jain <[email protected]>

---------

Signed-off-by: Ritik Jain <[email protected]>
Co-authored-by: Ritik Jain <[email protected]>
  • Loading branch information
RitikJain4108 and Ritik Jain authored Nov 6, 2023
1 parent 3d6d409 commit 95e696e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,12 @@ public ThreadPoolTaskScheduler threadPoolTaskScheduler() {
@Qualifier("AuditExecutor")
public TaskExecutor AuditExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(Math.floorDiv(env.getProperty("mosip.resident.async-thread-count", Integer.class), 4));
executor.setMaxPoolSize(env.getProperty("mosip.resident.async-thread-count", Integer.class));
executor.setCorePoolSize(Math.floorDiv(env.getProperty("mosip.resident.async-core-pool-size", Integer.class, 100), 4));
executor.setMaxPoolSize(env.getProperty("mosip.resident.async-max-pool-size", Integer.class, 100));
executor.setThreadNamePrefix("Async-audit");
executor.setWaitForTasksToCompleteOnShutdown(true);
executor.initialize();
return new DelegatingSecurityContextAsyncTaskExecutor(executor);
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -499,4 +499,5 @@ resident.cache.expiry.time.millisec.getImmediateChildrenByLocCode=86400000
resident.cache.expiry.time.millisec.getLocationHierarchyLevels=86400000
resident.cache.expiry.time.millisec.getAllDynamicFieldByName=86400000

mosip.resident.async-thread-count=100
mosip.resident.async-core-pool-size=100
mosip.resident.async-max-pool-size=100

0 comments on commit 95e696e

Please sign in to comment.