I've been reporting bugs with very inaccurate "cause of the bug" ponderings, but here goes another one:
Our biggest Moodle never runs weekly and monthly statistics. It stopped doing those in November. It does all of the daily statistics though. However, in mdl_config the values for statslastweekly and statslastmonthly are very recent!
Looking at the code: stats_cron_weekly() does set_config('statslastweekly',time()); before is starts any processing. If it then runs out of time after just one minute, it still "reports" that the weekly stats were run "just five minutes ago". Then, if I'm not incorrect, next time the check for
if (isset($CFG->statslastweekly) and ((time() - (7*24*60*60)) <= $CFG->statslastweekly))
says that "no, it hasn't been a week since this was last run".
I'm not sure why it never progresses, but the logic of "we got this far" seems to be incorrect...
- will be (partly) resolved by
-
MDL-13192 stats cleanup - meta
-
- Closed
-