create a build-results exch for reduced publishing permissions
This commit is contained in:
parent
f46670f738
commit
a768636690
|
@ -81,7 +81,7 @@ function runner($msg) {
|
||||||
'content_type' => 'application/json',
|
'content_type' => 'application/json',
|
||||||
'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT,
|
'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT,
|
||||||
));
|
));
|
||||||
$msg->delivery_info['channel']->basic_publish($message, '', 'build-results');
|
$msg->delivery_info['channel']->basic_publish($message, 'build-results');
|
||||||
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
$msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']);
|
||||||
|
|
||||||
echo "finished\n";
|
echo "finished\n";
|
||||||
|
|
|
@ -8,8 +8,12 @@ $connection = rabbitmq_conn();
|
||||||
$channel = $connection->channel();
|
$channel = $connection->channel();
|
||||||
$channel->basic_qos(null, 1, true);
|
$channel->basic_qos(null, 1, true);
|
||||||
|
|
||||||
|
|
||||||
|
$channel->exchange_declare('build-jobs', 'fanout', false, true, false);
|
||||||
|
|
||||||
list($queueName, , ) = $channel->queue_declare('build-results',
|
list($queueName, , ) = $channel->queue_declare('build-results',
|
||||||
false, true, false, false);
|
false, true, false, false);
|
||||||
|
$channel->queue_bind($queueName, 'build-jobs');
|
||||||
|
|
||||||
function runner($msg) {
|
function runner($msg) {
|
||||||
$body = json_decode($msg->body);
|
$body = json_decode($msg->body);
|
||||||
|
|
Loading…
Reference in a new issue