CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
32
airtime_mvc/library/php-amqplib/demo/amqp_publisher.php
Normal file
32
airtime_mvc/library/php-amqplib/demo/amqp_publisher.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
/**
|
||||
* Sends a message to a queue
|
||||
*
|
||||
* @author Sean Murphy<sean@iamseanmurphy.com>
|
||||
*/
|
||||
|
||||
require_once('../amqp.inc');
|
||||
|
||||
$HOST = 'localhost';
|
||||
$PORT = 5672;
|
||||
$USER = 'guest';
|
||||
$PASS = 'guest';
|
||||
$VHOST = '/';
|
||||
$EXCHANGE = 'router';
|
||||
$QUEUE = 'msgs';
|
||||
|
||||
$conn = new AMQPConnection($HOST, $PORT, $USER, $PASS);
|
||||
$ch = $conn->channel();
|
||||
$ch->access_request($VHOST, false, false, true, true);
|
||||
$ch->exchange_declare($EXCHANGE, 'direct', false, false, false);
|
||||
|
||||
$msg_body = implode(' ', array_slice($argv, 1));
|
||||
$msg = new AMQPMessage($msg_body, array('content_type' => 'text/plain'));
|
||||
|
||||
$ch->basic_publish($msg, $EXCHANGE);
|
||||
|
||||
echo "Sent message '".$msg_body."'\n";
|
||||
$ch->close();
|
||||
$conn->close();
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue