1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/ifroot-Tiny-Tiny-RSS

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
update_feeds.php 1.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Andrew Dolgov Отправлено 31.01.2009 19:02 0002bc9
#!/usr/bin/php
<?php
// this script is probably run not from your httpd-user, so cache
// directory defined in config.php won't be accessible
define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache-cli');
define('SIMPLEPIE_CACHE_DIR', '/var/tmp/simplepie-ttrss-cache-cli');
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
define('DISABLE_SESSIONS', true);
error_reporting(DEFAULT_ERROR_LEVEL);
require_once "sanity_check.php";
require_once "config.php";
require_once "db.php";
require_once "db-prefs.php";
require_once "functions.php";
$lock_filename = "update_feeds.lock";
$lock_handle = make_lockfile($lock_filename);
// Try to lock a file in order to avoid concurrent update.
if (!$lock_handle) {
die("error: Can't create lockfile ($lock_filename). ".
"Maybe another process is already running.\n");
}
// Create a database connection.
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if (!$link) {
if (DB_TYPE == "mysql") {
print mysql_error();
}
// PG seems to display its own errors just fine by default.
return;
}
init_connection($link);
// Purge all posts (random 30 feeds)
//global_purge_old_posts($link, true, 30);
// Update all feeds needing a update.
update_daemon_common($link);
db_close($link);
unlink(LOCK_DIRECTORY . "/$lock_filename");
?>

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/ifroot-Tiny-Tiny-RSS.git
git@api.gitlife.ru:oschina-mirror/ifroot-Tiny-Tiny-RSS.git
oschina-mirror
ifroot-Tiny-Tiny-RSS
ifroot-Tiny-Tiny-RSS
master