Skip to content

Commit 4d8e63b

Browse files
committed
Removed rabbitmq-name from AMSlib required fields (#99)
Signed-off-by: Loic Pottier <[email protected]>
1 parent 27db0eb commit 4d8e63b

File tree

5 files changed

+3
-12
lines changed

5 files changed

+3
-12
lines changed

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ jobs:
466466
\"db\": {
467467
\"dbType\": \"rmq\",
468468
\"rmq_config\": {
469-
\"rabbitmq-name\": \"rabbit\",
470469
\"rabbitmq-user\": \"${RABBITMQ_USER}\",
471470
\"rabbitmq-password\": \"${RABBITMQ_PASS}\",
472471
\"service-port\": ${RABBITMQ_PORT},

src/AMSlib/AMS.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ class AMSWrap
373373
auto rmq_entry = entry["rmq_config"];
374374
int port = getEntry<int>(rmq_entry, "service-port");
375375
std::string host = getEntry<std::string>(rmq_entry, "service-host");
376-
std::string rmq_name = getEntry<std::string>(rmq_entry, "rabbitmq-name");
377376
std::string rmq_pass =
378377
getEntry<std::string>(rmq_entry, "rabbitmq-password");
379378
std::string rmq_user = getEntry<std::string>(rmq_entry, "rabbitmq-user");
@@ -405,7 +404,6 @@ class AMSWrap
405404
auto &DB = ams::db::DBManager::getInstance();
406405
DB.instantiate_rmq_db(port,
407406
host,
408-
rmq_name,
409407
rmq_pass,
410408
rmq_user,
411409
rmq_vhost,

src/AMSlib/wf/basedb.hpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,6 @@ class RMQInterface
16041604
/**
16051605
* @brief Connect to a RabbitMQ server
16061606
* @param[in] rmq_name The name of the RabbitMQ server
1607-
* @param[in] rmq_name The name of the RabbitMQ server
16081607
* @param[in] rmq_password The password
16091608
* @param[in] rmq_user Username
16101609
* @param[in] rmq_vhost Virtual host (by default RabbitMQ vhost = '/')
@@ -1616,8 +1615,7 @@ class RMQInterface
16161615
* @param[in] routing_key Routing key for incoming messages (must match what the AMS Python side is using)
16171616
* @return True, True if connection succeeded for both publisher/consumer
16181617
*/
1619-
std::pair<bool, bool> connect(std::string rmq_name,
1620-
std::string rmq_password,
1618+
std::pair<bool, bool> connect(std::string rmq_password,
16211619
std::string rmq_user,
16221620
std::string rmq_vhost,
16231621
int service_port,
@@ -2076,7 +2074,6 @@ class DBManager
20762074

20772075
void instantiate_rmq_db(int port,
20782076
std::string& host,
2079-
std::string& rmq_name,
20802077
std::string& rmq_pass,
20812078
std::string& rmq_user,
20822079
std::string& rmq_vhost,
@@ -2096,8 +2093,7 @@ class DBManager
20962093
dbType = AMSDBType::AMS_RMQ;
20972094
updateSurrogate = update_surrogate;
20982095
#ifdef __ENABLE_RMQ__
2099-
rmq_interface.connect(rmq_name,
2100-
rmq_pass,
2096+
rmq_interface.connect(rmq_pass,
21012097
rmq_user,
21022098
rmq_vhost,
21032099
port,

src/AMSlib/wf/rmqdb.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,7 @@ bool RMQPublisher::close(unsigned ms, int repeat)
927927
* RMQInterface
928928
*/
929929

930-
std::pair<bool, bool> RMQInterface::connect(std::string rmq_name,
931-
std::string rmq_password,
930+
std::pair<bool, bool> RMQInterface::connect(std::string rmq_password,
932931
std::string rmq_user,
933932
std::string rmq_vhost,
934933
int service_port,

tests/AMSlib/json_configs/rmq.json.in

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"service-port": 0,
66
"service-host": "",
77
"rabbitmq-erlang-cookie": "",
8-
"rabbitmq-name": "",
98
"rabbitmq-password": "",
109
"rabbitmq-user": "",
1110
"rabbitmq-vhost": "",

0 commit comments

Comments
 (0)