← Back to team overview

mahara-contributors team mailing list archive

[Bug 759414] [NEW] Daily logged-in users count inaccurate when cron is delayed

 

Public bug reported:

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.

** Affects: mahara
     Importance: Medium
     Assignee: Richard Mansfield (richard-mansfield)
         Status: In Progress

** Changed in: mahara
     Assignee: (unassigned) => Richard Mansfield (richard-mansfield)

** Changed in: mahara
       Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/759414

Title:
  Daily logged-in users count inaccurate when cron is delayed

Status in Mahara ePortfolio:
  In Progress

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.



Follow ups

References