Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-1730

Refactor swatch-tally-hourly Job to use curl and internal endpoint

XMLWordPrintable

      The swatch-tally-hourly job is defined in the clowdapp.yaml file as a cronjob.

      However, this job will start the Swatch Tally service using the profiles "capture-hourly-snapshots" and "kafka-queue" (see here).

      The relevant profile here is "capture-hourly-snapshots" which will make the Tally service to act as a command line program to execute the CaptureSnapshotsJob task which does:

      tasks.updateHourlySnapshotsForAllOrgs(Optional.empty());
      

      The same method is invoked by calling the endpoint "/rpc/tally/snapshots".

      Acceptance Criteria:

      • Modify the "tally" job in clowdapp.yaml to invoke the "/rpc/tally/snapshots" (the "begin" and "end" query params must not be provided). (As an example, the "purge" job is already invoking another endpoint here).
      • Delete the spring profile "capture-hourly-snapshots" since it should not be used any longer (ensure "CaptureSnapshotsTaskManager" is properly imported when running the swatch tally service).
      • Update the test CaptureHourlySnapshotsJobDeploymentTest to use "worker" instead of "capture-hourly-snapshots".
      • Delete CaptureHourlySnapshotsConfiguration, CaptureHourlySnapshotsJob
      • Update the diagram to remove the deleted profile

              jcarvaja@redhat.com Jose Carvajal Hilario
              jcarvaja@redhat.com Jose Carvajal Hilario
              Sumedh Sidhaye Sumedh Sidhaye
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: