Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated path of IronMQ submodule so it will be uploaded. Updated work…
…er to push the tweet to the queue.
- Loading branch information
Paddy Foran
committed
Jan 10, 2012
1 parent
5c8c4e1
commit 84a1b53
Showing
4 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
[submodule "lib/IronWorker"] | ||
path = lib/IronWorker | ||
url = git://github.com/iron-io/iron_worker_php.git | ||
[submodule "lib/IronMQ"] | ||
path = lib/IronMQ | ||
[submodule "lib/worker/IronMQ"] | ||
path = lib/worker/IronMQ | ||
url = git://github.com/iron-io/iron_mq_php.git | ||
[submodule "worker/lib/IronMQ"] | ||
path = worker/lib/IronMQ | ||
url = git://github.com/iron-io/iron_mq_php.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
<?php | ||
|
||
include("lib/IronMQ/IronMQ.class.php"); | ||
|
||
function getTweet($query) { | ||
return file_get_contents("http://search.twitter.com/search.json?q=".$query."&rpp=1"); | ||
$results = file_get_contents("http://search.twitter.com/search.json?q=".$query."&rpp=1"); | ||
return $results["results"][0]; | ||
} | ||
|
||
$config = parse_ini_file('config.ini', true); | ||
print_r(getTweet($config['twitter']['query'])); | ||
echo "Searching for ".$config['twitter']['query']."..."; | ||
|
||
$tweet = getTweet($config['twitter']['query']); | ||
print_r($tweet); | ||
|
||
$mq = new IronMQ('config.ini', true); | ||
|
||
$response = $mq->postMessage('', "TweetWorker", array("body" => $tweet["text"])); | ||
|
||
print_r($response); | ||
|
||
?> |
Submodule IronMQ
updated
from 000000 to 5a0ebd