← Back to team overview

dhis2-devs team mailing list archive

Re: Check if existing analytics table update is running

 

Hi Jasper,
You can issue a GET request to

dhis/api/system/tasks/ANALYTICSTABLE_UPDATE

which will provide something like

[

   -
   {
      - uid: "fUEPDKfXsoE",
      - level: "INFO",
      - category: "ANALYTICSTABLE_UPDATE",
      - time: "2016-07-19T07:35:31.915+0000",
      - message: "Updating resource tables",
      - completed: false
      },
   -
   {
      - uid: "BkrPBGVPjo6",
      - level: "INFO",
      - category: "ANALYTICSTABLE_UPDATE",
      - time: "2016-07-19T07:35:31.914+0000",
      - message: "Analytics table update process started",
      - completed: false
      }

]

when analytics is done, "completed" will change to "true".

Regards,
Jason


On Mon, Jul 18, 2016 at 5:04 PM, Jasper Timm <jasper.timm@xxxxxxxxxxxxxxxxxx
> wrote:

> Hi all,
>
> We have a cron job which triggers the analytics tables to be generated and
> we seem to run into issues when the job takes too long and a new request to
> update is sent before the old one completes.
>
> Currently running a PUT every 20 minutes (extended from previously using 5
> minutes due to this issue) against /api/resourceTables/analytics
>
> Is there an endpoint we can hit to check if there is an existing analytics
> update already running?
>
> Thanks,
>
> - Jasper
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

Follow ups

References