Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-8893

Split billing cron job in chunks

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • SaaS
    • System
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • -

      Presently billing runs without a dedicated worker. It is defined in ThreeScale::Jobs::BILLING

      It runs for between 7k and 8k seconds and is not nicely logged thus we can't easily monitor the performance. Presently in sidekiq log looks like:

      2022-11-01T11:50:08.971Z 21905 TID-otq8ntbs5 CronJob::Worker JID-376d46f132477bfc96c71f37 INFO: done: 13807.327 sec
      

      The above is longer because start of month there is more work.

      A new Worker class needs to be created so it is logged properly (e.g. BillingBatchEnqueuer). Also this enqueuer worker may split accounts in batches of enqueuers to limit the overall time each job runs (e.g. BillingEnqueuer, these should be throttled to 1 or 2 simultaneous execution). Finally these can enqueue the current individual billing workers.

              Unassigned Unassigned
              akostadi1@redhat.com Aleksandar Kostadinov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: