Skip to content

Commit

Permalink
Pull request OsiriX-Foundation#221: feat: rollback and set to 5 min
Browse files Browse the repository at this point in the history
Merge in TELIMA/karnak from TELIMA-292 to master

* commit '36de7936d1b5c73d55c02d59f2c50be98d4d0ea1':
  feat: rollback and set to 5 min
  • Loading branch information
jdcshug committed Oct 17, 2024
2 parents de029fe + 36de793 commit e9f28df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public void onTransferMonitoringEvent(TransferMonitoringEvent transferMonitoring
}

/**
* Occurs every ${monitoring.cleaning-frequency} property: clean transfer_status table
* if over the size limit LIFO: clean oldest records
* Occurs every 5 min: clean transfer_status table if over the size limit LIFO: clean
* oldest records
*/
@Scheduled(fixedRateString = "${monitoring.cleaning-frequency}")
@Scheduled(fixedRate = 5 * 60 * 1000)
public void cleanTransferStatus() {
int nbRecords = (int) transferStatusRepo.count();
if (nbRecords > sizeLimit) {
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ management:
monitoring:
# Maximum of sop instance sent for the monitoring
max-history: 300000
# Cleaning frequency of the monitoring in minutes
cleaning-frequency: 300000 # Represents 5 minutes

mail:
sender: [email protected]
1 change: 0 additions & 1 deletion src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ spring:
enabled: false
monitoring:
max-history: 50000
cleaning-frequency: 300000 # Represents 5 minutes
mail:
sender: [email protected]

0 comments on commit e9f28df

Please sign in to comment.