One of run methods is missing its implementation, and the new classes are not hooked up into execution path yet.
eviL3 wrote:For the filenames, perhaps:
- Code: Select all
Are you suggesting all mods put their cron tasks in the same directory as phpbb core? I think some sort of namespacing by mod is necessary.
The class name being "cron_task_prune_all_forums". Or "cron_prune_all_forums". Or "phpbb_cron_prune_all_forums".
I used prune_all_forums_cron_task, but I'm open to inverting it to cron_task_prune_all_forums.
Perhaps cron_task_core_prune_all_forums, and the file location includes/cron/tasks/core/prune_all_forums.php?
Could you give a slightly more verbose description of how getUrlQueryString() works?
Consider forum pruning. In 3.0 whenever a forum is viewed, it may be scheduled for pruning. Scheduling piggybacks onto other queries and requires no additional queries. Thus one forum is pruned at a time, and the forum id is passed from viewforum.php to cron.php.
This forum id parameter is required for 'prune one forum' task to function. It is passed from cron scheduler to cron runner, in 3.0 case, via the url. get_url_query_string takes whatever parameters a cron task takes (through its constructor, see http://github.com/p/phpbb3/blob/6429e83 ... _forum.php) and returns them as (part of) query string, which will then be used by cron class to construct correct cron.php url.
Reference: http://tps.projects.bsdpower.com/browse ... m.php#L195
If pruning now is invoked from system cron, we are going to check all forums for prunability and prune all forums as necessary. This explains two pruning tasks.
In what cases would isShutdownFunctionSafe() return false?
It's a port of this: http://tps.projects.bsdpower.com/browse ... on.php#L82
We should also take a look at the proposed dependency injection, I'd be glad to provide some more description of how that could work.
To be honest I have my hands full just shuffling the code around. I certainly have not planned on altering actual code until the shuffling is finished. If you think dependency injection should happen in parallel with the shuffling, or that it needs to be considered in the architecture, please do elaborate.