function cron_check_for_updates takes too long to run

Bug #1884346 reported by Cecilia Vela Gurovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Cecilia Vela Gurovic

Bug Description

It's unlikely that the mahara.org mahara version will change very often, and we are calling the function cron_check_for_updates constantly (everytime we load a page, when loading a modal, etc) to see if the mahara version has change.

Everytime this function is called when using the site (not by cron job), it executes a mahara_http_request that will take a bit more than 2 seconds, making the mahara instance work slower than it should.

If this data doesn't change that often we can save this value in the $SESSION variable so the mahara_http_request is not being called all the time.

Changed in mahara:
milestone: none → 20.10.0
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11029

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11029
Committed: https://git.mahara.org/mahara/mahara/commit/d49359dbd3cb4b74e4259f717f011828eb3f0641
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit d49359dbd3cb4b74e4259f717f011828eb3f0641
Author: Cecilia Vela Gurovic <email address hidden>
Date: Sat Jun 20 19:24:11 2020 +1200

Bug 1884346: adding mahara.org version to SESSION var

behatnotneeded

Change-Id: I05f8b7892d88507e8de74057a4c534c321330d37

Revision history for this message
Robert Lyon (robertl-9) wrote :

Ah - I added the check for the mahara manual link - which is on every page ;(

So yep setting this to be a session variable will avoid this and any future places calling that function from doing curl requests too much

Changed in mahara:
importance: Undecided → High
status: New → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.