Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3263

Move the whole pattern for updateConceptIndexes into the scheduler

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      The ConceptServiceImpl.updateConceptIndexes() method attempts to prevent the task from being scheduled if it already scheduled. We should make this an api method in the SchedulerService so that the pattern doesn't have to be duplicated by other services/devs/modules.

      Create method SchedulerService.scheduleIfNotExists(TaskDefinition)

      Create a unit test to verify this method is working.

      ABKTODO: this whole pattern should be moved into the scheduler, providing a call like scheduleThisIfNotRunning()
      File: /api/src/main/java/org/openmrs/api/impl/ConceptServiceImpl.java
      Line: 1819

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lluismf Lluis Martinez
              Reporter:
              nullakilla Anton Alekseiev
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 hours
                  3h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour Time Not Required
                  1h