CC-2750:Ability to query health status for pypo, liquidsoap, media monitor, and recorder

This commit is contained in:
martin 2011-09-12 16:18:08 -04:00
parent 0591c9d76f
commit 0546633ac7
5 changed files with 88 additions and 11 deletions

View file

@ -13,15 +13,16 @@ $PORT = 5672;
$USER = 'guest';
$PASS = 'guest';
$VHOST = '/';
$EXCHANGE = 'router';
$EXCHANGE = 'airtime-pypo';
$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);
$ch->exchange_declare($EXCHANGE, 'direct', false, true);
$msg_body = implode(' ', array_slice($argv, 1));
$msg_body = json_encode(array("event_type"=>"get_status", "id"=>time()));
//$msg_body = '{"schedule":{"status":{"range":{"start":"2011-09-12 20:45:22","end":"2011-09-13 20:45:22"},"version":"1.1"},"playlists":[],"check":1,"stream_metadata":{"format":"","station_name":""}},"event_type":"update_schedule"}';
$msg = new AMQPMessage($msg_body, array('content_type' => 'text/plain'));
$ch->basic_publish($msg, $EXCHANGE);