-
Notifications
You must be signed in to change notification settings - Fork 245
Report-870 #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
niyolynate
wants to merge
145
commits into
TRUNK-5375
Choose a base branch
from
master
base: TRUNK-5375
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Report-870 #230
+14,391
−12,755
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…y other generic indicators (#164)
BirthAndDeathCohortDefinition should query on whether patient is marked as dead
…on editing a particular dataSet
…igurable connection
…igurable connection
PatientIdentifierDataEvaluator should return all identifiers if no identifier type specified
Additional enhancements to include ability to filter on coded answers
…y deserialize before and after change to convert non-static inner class to static inner-class
… property deserialize before and after change to convert non-static inner class to static inner-class
REPORT-856: ActiveOnDate should Include onset and End dates
Also related to O3-1494 --------- Co-authored-by: druchniewicz <[email protected]>
* Migrate to 2.4.0 * Move api-1.9 * Merge old api modules to the main * Set the scope of reportingcompatibility to provided
This reverts commit e4022f6.
* Update to Platform 2.7.0 and Support Java 21 * Migrate to org.openmrs.test.jupiter.BaseModuleContextSensitiveTest * Add the EvaluationProfilerTest24On
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Still haven't sent my changes, i get errors..
i get errors in git while pushing them. will keep trying though. i added restart @LINE45 - 49 and added time for tasks at line 90-99.
package org.openmrs.module.reporting;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openmrs.api.context.Context;
import org.openmrs.module.BaseModuleActivator;
import org.openmrs.module.DaemonToken;
import org.openmrs.module.DaemonTokenAware;
import org.openmrs.module.reporting.common.MessageUtil;
import org.openmrs.module.reporting.report.task.ReportingTimerTask;
import org.openmrs.module.reporting.report.task.RunQueuedReportsTask;
/**
This class contains the logic that is run every time this module is either started or shutdown
*/
public class ReportingModuleActivator extends BaseModuleActivator implements DaemonTokenAware {
private Log log = LogFactory.getLog(this.getClass());
@OverRide
public void contextRefreshed() {
// This will ensure that the MessageUtil picks back up the current active message source
MessageUtil.setMessageSource(null);
}
@OverRide
public void started() {
ReportingTimerTask.setEnabled(true);
log.info("Reporting Module Started...");
}
@OverRide
public void restart()
restartAllScheduledTasks();
restartCurrentRunningReportRequest;
}
@OverRide
public void willStop() {
cancelAllScheduledTasks();
cancelCurrentlyRunningReportRequests();
}
@OverRide
public void stopped() {
log.info("Reporting Module Stopped...");
}
@OverRide
public void setDaemonToken(DaemonToken token) {
ReportingTimerTask.setDaemonToken(token);
}
/**
Cancels all scheduled tasks
/
private void cancelAllScheduledTasks() {
for (ReportingTimerTask task : Context.getRegisteredComponents(ReportingTimerTask.class)) {
try {
task.cancel();
}
catch (Exception e) {
log.warn("An exception occurred while trying to stop reporting task " + task.getTaskClass().getSimpleName(), e);
}
}
}
/*
Cancels all currently running report requests
*/
private void cancelCurrentlyRunningReportRequests() {
for (RunQueuedReportsTask task : RunQueuedReportsTask.getCurrentlyRunningRequests().values()) {
try {
task.cancelTask();
}
catch (Exception e) {
log.warn("An exception occurred while trying to stop currently running reports", e);
}
}
}