type}", 0.01); calais_process_node($node, $process_type, $threshold, 'update'); // It's nice to give Calais's poor servers a break in between processing. if ($throttle) { usleep(100000); } } // Update the last node imported and provide status report. $remaining = db_result(db_query("SELECT COUNT(n.nid) FROM {node} n LEFT JOIN {calais_term_node} c ON n.nid = c.nid WHERE n.type IN ('%s') AND n.nid > %d AND c.nid IS NULL" , implode("','", $valid_types), $node->nid)); print t('Processed through record @record. @remaining remaining.', array('@record' => $node->nid, '@remaining' => $remaining)); }