我已经通过终端从phirehose运行示例脚本,并查看了我的测试推文的实时/活动 ptint_r。我已经加载了 ghetto 队列文件,他们执行日志记录并取得了巨大的成功。但我似乎无法找到数据的去向。它实际写入的是什么文件?这两个示例文件让我相信它是相对于脚本执行位置的目录,但我什么也看不到ghetto-queue-collect.php
。有什么建议么? ghetto-queue-consume.php
/tmp
以下是日志中的一些行
[03-Mar-2014 02:44:43 America/New_York] Phirehose: Opening new active status stream: /tmp/.phirehose-ghettoqueue.current
[03-Mar-2014 02:45:12 America/New_York] Phirehose: Successfully rotated active stream to queue file: /tmp/phirehose-ghettoqueue.20140303-024512.queue
- - - 和 - - -
[03-Mar-2014 03:41:58 America/New_York] Processing file: /tmp/phirehose-ghettoqueue.20140303-024102.queue
[03-Mar-2014 03:41:59 America/New_York] Successfully processed 1 tweets from /tmp/phirehose-ghettoqueue.20140303-024102.queue - deleting.
-- 有问题的代码,我认为 --
/**
* Subclass specific constants
*/
const QUEUE_FILE_PREFIX = 'phirehose-ghettoqueue';
const QUEUE_FILE_ACTIVE = '.phirehose-ghettoqueue.current';
public function __construct($username, $password, $queueDir = '/tmp', $rotateInterval = 10)
// Set subclass parameters
$this->queueDir = $queueDir;
// Construct stream file name, log and open
$this->streamFile = $this->queueDir . '/' . self::QUEUE_FILE_ACTIVE;
$this->log('Opening new active status stream: ' . $this->streamFile);
$this->statusStream = fopen($this->streamFile, 'a'); // Append if present (crash recovery)