From d5c96771370f9a7d18eb7f528387c2c67dee1470 Mon Sep 17 00:00:00 2001 From: Denver Gingerich Date: Tue, 14 Apr 2020 18:23:54 +0000 Subject: [PATCH] read queue name from file and note needed settings --- h2r-bwmsgsv2.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/h2r-bwmsgsv2.php b/h2r-bwmsgsv2.php index 65dc5b642e1bcf69ceed444e502c6da26946cbe4..8d60e2f29c7aeb64b5f0fdd0a4cc4ce8b32a8a25 100644 --- a/h2r-bwmsgsv2.php +++ b/h2r-bwmsgsv2.php @@ -23,7 +23,10 @@ $tai_timestamp = trim(shell_exec('./tai')); $raw_data = file_get_contents('php://input'); +# below must set $redis_host, $redis_port, $queue_name ($redis_auth is optional) +# *it is the settings file for this program, the bwmsgsv2 HTTP to Redis acceptor include 'settings-h2r.php'; + $redis = new Redis(); $rv = $redis->pconnect($redis_host, $redis_port); @@ -41,7 +44,7 @@ if (!empty($redis_auth)) { $time2 = microtime(true); $tai_timestamp2 = trim(shell_exec('./tai')); -$rv = $redis->lPush('incoming_messages-'.'test1a', # TODO: update queue name +$rv = $redis->lPush('incoming_messages-'.$queue_name, '"ts_020_tai-first_db_hit":'.$tai_timestamp2. ',"ts_020_unix-first_db_hit":'.$time2. ',"ts_010_tai-first_received":'.$tai_timestamp.