Skip to content
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

Report-870 #230

Open
wants to merge 116 commits into
base: TRUNK-5375
Choose a base branch
from
Open

Report-870 #230

wants to merge 116 commits into from

Conversation

niyolynate
Copy link

@niyolynate niyolynate commented Mar 21, 2022

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);

       	//Time lap between the last task to current updates.
       	public voidsetTask(Integer time) {
       		    oldT = t;
       		    t = time;
       		    log.debug("Time set to {}. innitialDate {}.", t, innitialDate);
       		    if(time.intValue() > 50sec) {
       		      log.info("Time passed in days\hr\min\sec.");
       }
      

      }
      }
      }

Ben-Waters and others added 30 commits March 20, 2018 10:41
BirthAndDeathCohortDefinition should query on whether patient is marked as dead
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
dependabot bot and others added 7 commits November 23, 2021 00:50
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.9.10.7 to 2.9.10.8.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…umn (#227)

- Increased reporting_report_design_resource.content_type to varchar(100),
  so it can fir the XLSX content type value
@kumuditha-udayanga
Copy link
Member

kumuditha-udayanga commented Apr 12, 2022

Hello @niyolynate, Before working on any changes make sure to take the latest updates from the upstream's master branch to update your remote.
In order to fix the git issue, I would suggest :

  1. In your local project, create a new branch from the master branch, git branch feature-{issue number}.
  2. Checkout to the newly created branch git checkout {branch name}
  3. Reset that branch to upstream's master branch git reset --hard upstream master. And pull the latest changes by git pull upstream master.
  4. Then start working on your changes, or else you can get the changes that you committed in the master branch using cherry-pick. (you must copy the checksum of the commit message from the master branch)
    git cherry-pick {checksum}
  5. If there are any changes before pushing the changes, commit the changes and take a pull from upstream and push the changes to your origin (make sure to push the changes using the new branch name, so it creates a new branch in the origin, and make a pull request using that branch).

alaboso and others added 22 commits May 2, 2022 12:44
Remove unnecessary dependency

Change the OMRS version for api-1.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.