I was keen to know the purpose of the hook_cron function in the ip.module
function ip_cron() {
// Process backlog of nodes.
ip_backlog_nodes();
// If nodes are done, process comments.
if (!variable_get('ip_backlog_nodes', PHP_INT_MAX)) {
ip_backlog_comments();
}
}
It appears redundant considering that both hook_node_insert and hook_comment_insert are implemented.
Comments
Comment #2
gedur commentedIt seems that the module tries to get information from previous posts, maybe the original idea was to extract data loaded before the module instalation (which could not be useful in all cases). This information is taken form the comments table and watchdog for nodes (trick). This is what I think as I was not the original maintainer of the module.
Comment #3
gedur commentedI'm thinking in moving this feature into a drush command, this way this will be optional and could be done once. I makes no sense to have it running in a cron process always because after install the module the data will be stored within hooks.
Comment #5
gedur commentedThe cron process has been moved to drush commands to be executed on demand.