Daily logged-in users count inaccurate when cron is delayed

Bug #759414 reported by Richard Mansfield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Richard Mansfield

Bug Description

The query uses CURRENT_DATE, but should count logged in users with lastaccess relative to the time the cron job was started.

I suspect there's a delay in cron_site_data_daily because it counts disk usage first (very slow) before it does logged-in users, so if it starts at 23:51, it might skip over into the following day before doing the logged-in users.

We should rewrite the logged-in users query to either hardcode the time the function starts (or just use CURRENT_TIMESTAMP - interval '1 day').

We should also move the disk usage check to happen after the user counts.

Changed in mahara:
assignee: nobody → Richard Mansfield (richard-mansfield)
status: Confirmed → In Progress
Changed in mahara:
status: In Progress → Fix Committed
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.