当前位置: 首页>>代码示例>>PHP>>正文


PHP QueueManager::updateStatFile方法代码示例

本文整理汇总了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;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:29,代码来源:QueueManager.Qmgr.php

示例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;
     }
 }
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:25,代码来源:QueueManager.tfQManager.php


注:本文中的QueueManager::updateStatFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。