本文整理汇总了PHP中Indexer::skipUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Indexer::skipUser方法的具体用法?PHP Indexer::skipUser怎么用?PHP Indexer::skipUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Indexer
的用法示例。
在下文中一共展示了Indexer::skipUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$DB = Indexer::getDB();
$usersToProcess = Indexer::getUsersToProcess();
$total_count = $total_added_files = $total_added_dirs = $total_deleted_files = $total_deleted_dirs = 0;
if (is_array($usersToProcess) && count($usersToProcess)) {
foreach ($usersToProcess as $user) {
//$user = $usersToProcess[1];
if (CONSOLE_OUT_CHARSET) {
printlog(1, @iconv('utf-8', CONSOLE_OUT_CHARSET, $user['nick']));
} else {
printlog(1, $user['nick']);
}
printlog(1, "(" . $user['files'] . "," . $user['dirs'] . ")-");
$st = microtime(true);
if (!file_exists(WORKER_TMPDIR . '/' . $user['filename'])) {
printlog(1, "list not exists, skipping\n");
Indexer::skipUser($user['id']);
continue;
}
list($added_files, $added_dirs, $deleted_files, $deleted_dirs) = Indexer::processUser($user['id'], 'compress.bzip2://' . WORKER_TMPDIR . '/' . $user['filename'], $user['files'], $user['dirs']);
printlog(1, "ADDED:{$added_files} files,{$added_dirs} dirs;DELETED:{$deleted_files} files,{$deleted_dirs} dirs-");
$total_added_files += $added_files;
$total_added_dirs += $added_dirs;
$total_deleted_files += $deleted_files;
$total_deleted_dirs += $deleted_dirs;
$total_count++;
$et = microtime(true);
printlog(1, round($et - $st, 2) . "s\n");
sleep(1);
//win+mysql 5.1: id=0 fixing
}
}