本文整理汇总了PHP中QueueManager::updateStatFile方法的典型用法代码示例。如果您正苦于以下问题:PHP QueueManager::updateStatFile方法的具体用法?PHP QueueManager::updateStatFile怎么用?PHP QueueManager::updateStatFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueueManager
的用法示例。
在下文中一共展示了QueueManager::updateStatFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dequeueTorrent
/**
* dequeueTorrent
* @param $torrent name of the torrent
*/
function dequeueTorrent($torrent)
{
$torrent = urldecode($torrent);
$alias_file = getRequestVar('alias_file');
if (isTorrentRunning($torrent)) {
// torrent has been started... try and kill it.
AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent . "has been started -- TRY TO KILL IT");
header("location: index.php?alias_file=" . $alias_file . "&kill=true&kill_torrent=" . urlencode($torrent));
exit;
} else {
if ($this->isQueueManagerRunning()) {
// send command to daemon
$this->sendQueueCommand('remove ' . substr($torrent, 0, -8));
// flag the torrent as stopped (in db)
stopTorrentSettings($torrent);
// update the stat file.
parent::updateStatFile($torrent, $alias_file);
// log
AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent);
} else {
header("location: admin.php?op=queueSettings");
exit;
}
}
}
示例2: dequeueTorrent
/**
* dequeueTorrent
* @param $torrent name of the torrent
*/
function dequeueTorrent($torrent)
{
$torrent = urldecode($torrent);
$alias_file = getRequestVar('alias_file');
// Is the Qinfo file still there?
if (file_exists($this->cfg["torrent_file_path"] . "queue/" . $alias_file . ".Qinfo")) {
// flag the torrent as stopped (in db)
stopTorrentSettings($torrent);
// update the stat file.
parent::updateStatFile($torrent, $alias_file);
// Remove Qinfo file.
@unlink($this->cfg["torrent_file_path"] . "queue/" . $alias_file . ".Qinfo");
// log
AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent);
} else {
// torrent has been started... try and kill it.
AuditAction($this->cfg["constants"]["unqueued_torrent"], $torrent . "has been started -- TRY TO KILL IT");
header("location: index.php?alias_file=" . $alias_file . "&kill=true&kill_torrent=" . urlencode($torrent));
exit;
}
}