forked from the-distro/ofborg
use persistent jobs
This commit is contained in:
parent
a996d75c4f
commit
8e84ed6a32
2 changed files with 8 additions and 2 deletions
|
@ -93,7 +93,10 @@ function runner($msg) {
|
||||||
echo "forwarding to build-jobs :)\n";
|
echo "forwarding to build-jobs :)\n";
|
||||||
|
|
||||||
$message = new AMQPMessage(json_encode($forward),
|
$message = new AMQPMessage(json_encode($forward),
|
||||||
array('content_type' => 'application/json'));
|
array(
|
||||||
|
'content_type' => 'application/json',
|
||||||
|
'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT,
|
||||||
|
));
|
||||||
$msg->delivery_info['channel']->basic_publish($message, 'build-jobs');
|
$msg->delivery_info['channel']->basic_publish($message, 'build-jobs');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,10 @@ function runner($msg) {
|
||||||
];
|
];
|
||||||
|
|
||||||
$message = new AMQPMessage(json_encode($forward),
|
$message = new AMQPMessage(json_encode($forward),
|
||||||
array('content_type' => 'application/json'));
|
array(
|
||||||
|
'content_type' => 'application/json',
|
||||||
|
'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']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue