read queue name from file and note needed settings

Denver Gingerich created

Change summary

h2r-bwmsgsv2.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Detailed changes

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.