Idea for feedback: soft time limits on cron

Re: Idea for feedback: soft time limits on cron

by Brendan Heywood -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

No tracker yet, I wanted more feedback first. It would probably get split into 3 or more trackers / commits depending on implementation. Some tasks performance stuff like the badges task is already in the tracker and being looked at eg MDL-50342 and probably others

I don't think we'd need any new DB schema, all you'd need is the config item for the time limit, the cron system would expose a simple api like

 $boolean softTimeExceeded();

which each task and the cron process would call it and jump out if needed. It would check the time run since cron started, but could also do a check for a recently disabled cron.

Yes there is some hairy tasks which may be harder to make them honor this, eg some reporting ones and forum digests, so I don't think we'll get a perfect solution. I'm more interesting the the system level changes in the first instance, and then focusing on the tasks themselves.