fennb/phirehose

processQueueFile function in ghetto-queue-consume never go into decode line

Closed this issue · 6 comments

I found out in log that processQueueFile function never decode the tweet if there is more than 1 tweet.
Is this because of the tweets in current file not separated with coma?
or raw statuses json format is not valid.
I want to insert each tweet into my database.

$data = json_decode($rawStatus, true);
if (isset($data) && isset($data['user']['screen_name'])) {
        $this->log('Decoded tweet: ' . $data['user']['screen_name'] . ': ' . urldecode($data['text']));
}

Hey @blaxroze search for issue "fputs bug in ghetto collection? #53" the answer lies there

@laoman Yup thanks. I found out the answer too.

@blaxroze you might be interested about this #96

fennb commented

Would anyone kind like to submit a pull request to change ghetto-queue-collect to append newlines as per #53? You would close 3 issues and be considered a genuine hero :)

@fennb just submitted one

fennb commented

Fixed in 197b7da