Uploaded image for project: 'Opencast'
  1. MH-12640

Query the correct set of jobs directly instead of filtering in Java

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects versions: 4.0
    • Fix versions: 5.2
    • Components: Backend Software

      Description

      While reviewing a PR, I've found some code in https://github.com/opencast/opencast/pull/28/commits/33fa480ef770912b83028869190749c0f2470c42 that seems highly inefficient:

      for (Job job : serviceRegistry.getJobs(WorkflowService.JOB_TYPE, null)) {
      if (WorkflowServiceImpl.Operation.START_WORKFLOW.toString().equals(job.getOperation()))

      { jobs.add(job); }

      }

      Maybe this could be improved by extending the service registry to directly retrieve the correct list of jobs assuming that this could be done by a database query directly.

        TestRail: Results

          Attachments

            Issue links

              Activity

                People

                • Assignee:
                  james.perrin James Perrin
                  Reporter:
                  staubesv Sven Stauber
                • Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    TestRail: Cases