From 8e84ed6a325856f5b7b5581f288e4e81bbd1f16c Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 31 Oct 2017 04:06:14 -0400 Subject: [PATCH] use persistent jobs --- build-filter.php | 5 ++++- builder.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build-filter.php b/build-filter.php index 854e7dd..53c18c1 100644 --- a/build-filter.php +++ b/build-filter.php @@ -93,7 +93,10 @@ function runner($msg) { echo "forwarding to build-jobs :)\n"; $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'); return true; } diff --git a/builder.php b/builder.php index 2e9522a..1c549c8 100644 --- a/builder.php +++ b/builder.php @@ -73,7 +73,10 @@ function runner($msg) { ]; $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_ack($msg->delivery_info['delivery_tag']);